Re: Why PHPLIB::DB sucks
| From: | Alexey Borzov | Date: | Fri, 06 Jun 2003 10:59:15 +0000 |
| Subject: | Re: Why PHPLIB::DB sucks | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17114@lists.php.net to get a copy of this message | ||
Hi!
Bertrand Mansion wrote:
No. PostgreSQL driver uses native sequences, MySQL driver uses sequence emulation, but it relies on auto_increment feature and does not require locking -> no bottlenecks.I looked a bit closer at the code and found out that this 'emulation' actually does not use native sequences at all. Instead it creates a table for all the sequences and locks it exclusively when a need to get a next id arises. This is even more brain-damaged, exclusive lock in PostgreSQL is usually acquired only by DROP TABLE, ALTER TABLE, CREATE INDEX and similar commands. This creates a bottleneck that will nullify all possible speed increases with this 'light' layer.Isn't that the way they do it in PEAR::DB too ?