News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Jones:
Converting REF CURSOR to PIPE for Performance in PHP OCI8 and PDO_OCI
November 04, 2008 @ 08:48:36

In this new post to his blog Chris Jones looks at an option to increase the performance of your PHP/Oracle application even more - converting a REF CURSOR into a piped data set via the PDO_OCI extension.

REF CURSORs are common in Oracle's stored procedural language PL/SQL. They let you pass around a pointer to a set of query results. However in PHP, PDO_OCI doesn't yet allow fetching from them. [...] One workaround, when you can't rewrite the PL/SQL code to do a normal query, is to write a wrapper function that pipes the output.

He includes an example, creating an example myproc() that contains the query to select the last names of all employees in the table. This procedure is put inside of a package so it can be called directly in the SQL statement and the ref cursor can be automatically piped to output.

0 comments voice your opinion now!
oracle oci8 extension pdooci performance refcursor pipe procedure package


blog comments powered by Disqus

Similar Posts

Davey Shafik's Blog: ext/dom and libxml2 charset and entities behaviors

Damian Sromek's Blog: [How to] Run PHPUnit tests using database 10x faster

PEAR Blog: PEAR2 standards, we would like to know what you think

Zend Developer Zone: Using the Stack Exchange API with PHP (part 1)

Christopher Jones' Blog: OCI8 is Leading DB Driver Code Coverage Numbers


Community Events











Don't see your event here?
Let us know!


install release threedevsandamaybe facebook podcast project database language application hack component unittest security hhvm framework introduction symfony2 package performance composer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework