note 74304 added to function.PDOStatement-rowCount
| From: | php-general at lists dot php dot net | Date: | Wed, 04 Apr 2007 10:31:14 +0000 |
| Subject: | note 74304 added to function.PDOStatement-rowCount | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-125084@lists.php.net to get a copy of this message | ||
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?
----
Server IP: 69.39.81.135
Probable Submitter: 87.139.65.181
----
Manual Page -- http://www.php.net/manual/en/function.PDOStatement-rowCount.php
Edit -- https://master.php.net/note/edit/74304
Del: integrated -- https://master.php.net/note/delete/74304/integrated
Del: useless -- https://master.php.net/note/delete/74304/useless
Del: bad code -- https://master.php.net/note/delete/74304/bad+code
Del: spam -- https://master.php.net/note/delete/74304/spam
Del: non-english -- https://master.php.net/note/delete/74304/non-english
Del: in docs -- https://master.php.net/note/delete/74304/in+docs
Del: other reasons-- https://master.php.net/note/delete/74304
Reject -- https://master.php.net/note/reject/74304
Search -- https://master.php.net/manage/user-notes.php