From: helga79 at rediffmail dot com Operating system: Windows PHP version: 5.2.9 PHP Bug Type: OCI8 related Bug description: OCIFEtchstatement takes time to fetch records if application server and databas
Description: ------------ Application server in UK Database server in Frankfurt If I put time logs before and after OCIFetchStatement($stmt,$results) Start Time: 01.04.2009 09:28:40 end time:01.04.2009 09:29:12 Records fetched:1723 30 secs to fetch from Frankfurt database. The same code takes 2 secs from UK dataabse How do I reduce the delay? Reproduce code: --------------- function sql_query ($conn,$sql) { $dt =Date('d.m.Y h:i:s'); $fh2=fopen("$_SESSION[workflow_path]temp\\Logmefuncoci.txt",'a+'); if ($fh2) { fwrite($fh2,"\n 1.Sql Query: $sql \n Start Time:$dt "); } $stmt = OCIParse($conn, $sql); OCISetPrefetch($stmt,4000); OCIExecute($stmt,OCI_DEFAULT); $dt =Date('d.m.Y h:i:s'); if ($fh2) { fwrite($fh2,"\n\n2. OCIExecute end time and record count:$dt\n "); } //$n=OCIFetchStatement($stmt,$results); $dt =Date('d.m.Y h:i:s'); if ($fh2) { fwrite($fh2,"\n\n 3. OCI fetchsatement end time:$dt "); fwrite($fh2,"\n\n 4. Records fetched:$cnt "); } OCIFreeStatement($stmt); Expected result: ---------------- time delay should be reduced Actual result: -------------- takes 30secs in Frakfurt database 2 secs in UK database Same data is being fetched from both the servers -- Edit bug report at http://bugs.php.net/?id=47858&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47858&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47858&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47858&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47858&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47858&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47858&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47858&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47858&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47858&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47858&r=support Expected behavior: http://bugs.php.net/fix.php?id=47858&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47858&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47858&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47858&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47858&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47858&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47858&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47858&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47858&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47858&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47858&r=mysqlcfg