Re: oci8 numrows
| From: | (Stig Sæther Bakken) | Date: | Sat, 24 Mar 2001 06:18:21 +0000 |
| Subject: | Re: oci8 numrows | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-78@lists.php.net to get a copy of this message | ||
[bmansion@localhost.hst.nerim.net]
> Hi,
>
> It\'s good to have numrows with oci8.php. Thanks Stig.
> I have tested this on Win 2000 Server with Oracle 8.1.5 and Php 4.0.4, it
> works fine, and made some benchmarks using Benchmark/Timer.php.
>
> First, I have noticed that on Oracle, count(*) is faster than
> count(FIELD1,FIELD2...). Strange. The difference is not big enough to
> change it, though.
>
> Then I compared PEAR DB to PHPlib DB.
> It appears that there is a huge difference on connection times. I did not
> take into account the time it takes to require the different prepend and
> class files.
That's because DB::connect triggers parsing of DB/common.php and
DB/dbtype.php. There's a lot more code to parse in PEAR DB. To
rectify this, I'm going to convert the DB_common class to C (in the
short term), and in the long term convert the DB_dbtype classes
themselves to C as well.
> Connection to Oracle
> PEAR DB 240 ms with plogon (slower with ocilogon)
> PHPLIB 1 ms
>
> Other than that, there is no big differences, PHPlib being a little
> bit faster but with less features (error management, query
> manipulation...).
Is DB_oci8 connecting in the "optimal" way? I seem to remember that
the Oracle connection time varied wildly depending on what connect
parameters you used (at least "TNS name" versus ORACLE_SID).
- Stig
--
Stig Sæther Bakken <ssb@fast.no>
Fast Search & Transfer ASA, Trondheim, Norway