[MDB2] new code
| From: | Lukas Smith | Date: | Tue, 30 Dec 2003 11:42:49 +0000 |
| Subject: | [MDB2] new code | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-24659@lists.php.net to get a copy of this message | ||
Hi,
well after the proxy idea didnt really worked out as I had hoped I started
to play with some other concepts.
Well while I was messing with the code I did end up persuing the idea of
result objects instead of returning resources. While benchmarking I noticed
that the various intval($result) are really expensive. So it turns out that
returning objects as results is cheaper than having to do all those intval's
to internally store metadata about the result sets. This also opens up the
possibility of making specialized result set objects for buffered and
unbuffered result sets. Anyways in terms of performance we are now really
close to ADODB for simple query-fetch scenarios. And that even though MDB
has the optional datatype abstraction and the possibility to specify the
fetch method (ordered or assoc) in the fetch method.
I currently have two different types of result set classes:
Buffered and Unbuffered.
I am not yet 100% sure if that is the way to go, but it seems a bit more
clean and might even improve performance noticeably on RDBMS's that don't
have internal buffering mechanisms and where the user doesn't want buffer to
happen at all.
Regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com
Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin
Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07