php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47858 OCIFEtchstatement takes time to fetch records if application server and databas
Submitted: 2009-04-01 09:48 UTC Modified: 2009-04-01 20:04 UTC
From: helga79 at rediffmail dot com Assigned: sixd (profile)
Status: Not a bug Package: OCI8 related
PHP Version: 5.2.9 OS: Windows
Private report: No CVE-ID: None
 [2009-04-01 09:48 UTC] helga79 at rediffmail dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-01 20:04 UTC] sixd@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

-------------------
Please ask this question in a support forum, such as http://www.oracle.com/technology/forums/php.html where your setup can be discussed in detail and where you can give things like the full versions of the libraries, and a full test case including data.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 06:01:32 2024 UTC