From: Operating system: Linux & Snow Leopard PHP version: 5.3SVN-2010-04-20 (snap) Package: OCI8 related Bug Type: Bug Bug description:1 second+ needed for OCI8 versus PDO/oci to open/close connection and exit
Description: ------------ Is this normal to see the native OCI8 1.3.5 or later requiring additional time to run code snippet shown below when accessing Oracle 10.2.0.4. I'm seeing this at work as well (SUSE Linux). Therefore, I have stayed with OCI8 1.2.5 for the moment. Notice how the time is the same when using the PDO/OCI interface. Test script: --------------- # Native OCI8 Performance: # # PHP 5.2.14 201004191430, OCI8 1.2.5: ~ 0.15 seconds ;this is nice # # PHP 5.3.3 201004191430, OCI8 1.2.5: ~ 0.25 seconds ;takes 0.1 extra here # PHP 5.3.3 201004191430, OCI8 1.3.5: ~ 1.20 seconds ;slowness begins when # PHP 5.3.3 201004191430, OCI8 1.4.1: ~ 1.20 seconds ;script exits for 1.3.5+ # PHP 5.3.3 201004191430, OCI8 1.4.2: ~ 1.20 seconds <?php $conn = oci_connect('hr', 'hr', '//localhost:1521/mac10g'); if (!$conn) { $e = oci_error(); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } oci_close($conn); exit; ?> # PDO/OCI Performance: # # PHP 5.2.14 201004191430, OCI8 1.2.5: ~ 0.15 seconds ;very fast # # PHP 5.3.3 201004191430, OCI8 1.2.5: ~ 0.15 seconds ;same as PHP 5.2.14 :) # PHP 5.3.3 201004191430, OCI8 1.3.5: ~ 0.15 seconds ;very happy to see this # PHP 5.3.3 201004191430, OCI8 1.4.1: ~ 0.15 seconds ;with 1.3.5+ # PHP 5.3.3 201004191430, OCI8 1.4.2: ~ 0.15 seconds <?php try { $conn = new PDO('oci:dbname=127.0.0.1/mac10g', 'hr', 'hr'); } catch (PDOException $e) { trigger_error("Could not connect to database: ". $e->getMessage(), E_USER_ERROR); } $conn = NULL; exit; ?> Expected result: ---------------- I'm hoping that PHP 5.3.2+ with OCI8 1.4.1+ can perform as fast as PHP 5.2.13 with OCI8 1.2.5 when using the native driver. This is why I have stayed with 1.2.5 at work. It wasn't until tonight that I saw the times the same via the PDO interface. That made my day. Actual result: -------------- The native OCI8 1.3.5+ requires extra time to open/close and exit. The time delta is 1 second for such a small code snippet. -- Edit bug report at http://bugs.php.net/bug.php?id=51610&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51610&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51610&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51610&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51610&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51610&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51610&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51610&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51610&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51610&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51610&r=support Expected behavior: http://bugs.php.net/fix.php?id=51610&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51610&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51610&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51610&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51610&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51610&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51610&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51610&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51610&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51610&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51610&r=mysqlcfg