Re: oci driver performance

From: Date: Mon, 20 Oct 2008 11:43:36 +0000
Subject: Re: oci driver performance
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-45538@lists.php.net to get a copy of this message
Chris wrote:
Hi all, Using php 5.2.6 + oci driver 1.3.4 from pecl Has anyone had any issues with the oci8 driver performance? I'm doing some profiling using xdebug and all of the time seems to be spent in oci_execute and oci_fetch_array. This shows up when I use jmeter to hit the app pretty hard. The data being returned is quite small (returning < 10 rows) and the queries themselves are fast when run manually (or even through a separate script). They are fetching a lot of columns however. I eventually found the http://php.net/oci_internal_debug function and it shows a lot of "OCIAttrGet" calls. When I look at the oracle side of things, it's processing a lot of stuff but it's not out of control. I'm not sure what else to include so any suggestions/comments etc are most welcome. Thanks.
The oci_execute & oci_fetch_array calls will take the bulk of the time because there isn't much else to do for a query. Execution will, of course, take time while the DB is processing the query. So eliminate the DB configuration, character set conversion, etc as a cause first. The OCIAttrGet call are "local" calls and not the relatively expensive "round-trip" calls to the DB. Your comment about a lot of columns doesn't match the test you sent me offline: it only queries two columns. Chris -- Email: christopher.jones@oracle.com Tel: +1 650 506 8630 Twitter: http://twitter.com/ghrd Free PHP Book: http://tinyurl.com/f8jad

« previous php.db (#45538) next »