RE: [PEAR-DEV] Idea for pear sequence tables

From: Date: Tue, 16 Sep 2003 11:51:33 +0000
Subject: RE: [PEAR-DEV] Idea for pear sequence tables
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-21544@lists.php.net to get a copy of this message
> From: Rob Hutton [mailto:rob.hutton@comcast.net] > Sent: Tuesday, September 16, 2003 1:45 PM > Yes, this is true that there will be lock contention, but there would be > lock contention to a certain extent on a "sequence" table also. The > smallest piece that mosts DBs can lock for a write is a single block, > which > in small tables like this, most likely contains more that one row, maybe > even the whole table. When something was committed to disk, then the > whole > block again has to be locked (although pre and post imaging hide this > somewhat). > > That said, it does not change the fact that I agree that it would be > better > to put all of the sequences in one table. There are many situations where > unique ids per table, or at least in some tables, is a requirement. In > most > cases it is desired per table simply so the sequences are reasonable. > > The only reason that I can see to leave them in a separate table is the > perception that it is faster. The reason that I say perception is that in > a > small table like this, I would bet that the access time is miniscule > whether > you are reading two dozen records, or one. > > The down side of them being in separate tables is that you have two dozen > separate tables junking up the schema. This is not a trivial thing. > > So, why would a "single" sequence table not be done? Because ist your choice anyways .. simply use the same name for all your sequences. Regards, Lukas

« previous php.pear.dev (#21544) next »