note 74304 deleted from function.PDOStatement-rowCount by nlopess
| From: | nlopess@php.net | Date: | Wed, 04 Apr 2007 13:37:08 +0000 |
| Subject: | note 74304 deleted from function.PDOStatement-rowCount by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125088@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Of course, running a count(*) query with the same predicates as your main SELECT roughly doubles the
execution time. For expensive queries, this can kill your application. Been there, done that.
In a better (not even ideal) world, lame database engines which cannot return the number of rows
SELECTed would get a clue and do so. MySQL and Postgres both do it. Is there any reason to use any
other database engine? ;-)
Having worked for years with Sybase and Oracle clustered databases, I know the answer. But
seriously, shouldn't PHP developers pressure those "backward" database companies to
modernize and provide this feature?