PHP Oracle connection randomly slow
528103Aug 14 2006 — edited Apr 19 2011Hello,
I have a very strange problem concerning the connection to a oracle database with php. Sometimes the same SQL-Statement takes a very long time to load for no obvious reason (more than 5 minutes). But if you try it later it pops up at once. During the waiting time Toad is just showing "SQL*Net message from client" for the session.
Here the code:
$db = "<connection string>";
$c = oci_connect("user", "pwd", $db);
$s = ociparse($c, "select content from database WHERE CATEGORY = '$category'");
if(ociexecute($s)) {
while (ocifetch($s))
{
echo ociresult($s, "CONTENT");
}
}
Maybe I should also mention that I'm using a page with frames with a navigation bar on the left which loads the code in the frame on the right with the variable $category. We are using Oracle9i Release 9.0.1 .
I would really appreciate any help.