RE: [PEAR-DEV] Idea for pear sequence tables
| From: | Rob Hutton | Date: | Tue, 16 Sep 2003 12:51:27 +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-21557@lists.php.net to get a copy of this message | ||
If you have not been following the thread, just to catch you up, the
original question was why all sequences were not stored in the same table.
After Tomas said what you did, I gave several reasons why having separate
sequences was not only desirable, but required in many situations. This is
a continuation of that discussion...
Thanks,
Rob
> -----Original Message-----
> From: Lukas Smith [mailto:smith@backendmedia.com]
> Sent: Tuesday, September 16, 2003 7:52 AM
> To: 'Rob Hutton'; 'Jeroen Houben'; 'Tomas V.V.Cox'
> Cc: 'Stowe, Nola'; pear-dev@lists.php.net
> Subject: RE: [PEAR-DEV] Idea for pear sequence tables
>
>
> > 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
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>