PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #1771

change getOne() and getRow() to use limitQuery()

Details

Request #1771change getOne() and getRow() to use limitQuery()
Submitted2004-07-02 10:02 UTC
Frompear dot php dot net at chsc dot dk
Assigneddanielc
StatusWont fix
PackageDB
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2004-07-02 10:02 UTC] pear dot php dot net at chsc dot dk

Description:
------------
Just a thought:

How about changing DB_common::getOne to use $this->limitQuery() instead of $this->query().

If the result set is bigger than one row, the database server may be able to return early instead of transferring all the results to PHP.

Also, even if the query yields only one row, the database server might be able to optimize buffer size etc. before executing the query if it knows that it should only return one row.

[2004-07-02 10:04 UTC] pear dot php dot net at chsc dot dk

The same of course applies to DB_common::getRow().