Re: Oracle and PHP with Cursors



Björn Wächter wrote:
Hi all,

we are using Oracle and PHP for a Web application.
We are using ref cursors to return data from oracle
to php.


PROCEDURE GetData(
p_form IN VARCHAR2,
crs_data OUT Usertype.ref_cursor
)
AS
...
BEGIN
....

OPEN crs_data FOR v_sql;

END;



CREATE OR REPLACE PACKAGE usertype AS

TYPE ref_cursor IS REF CURSOR;

END usertype;


We are facing the problem that retrieving the data over
the cursor is quite slow because we see in the trace that
every row is request with one call to oracle. We enabled
prefetching in PHP but as fare as we know this is not
possible for cursors. We need the flexibility of cursors
to be able to return different numbers of columns in each
request.
Any ideas how we can solve this problem?
We read something about scrollable cursors. Is this a way?

Thanks Björn

Oracle version number.
DDL would be helpful.
Information such as the number of rows being returned useful.
Is there a WHERE clause anywhere in sight?
Has the statement been tuned? How? With DBMS_XPLAN?
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@xxxxxxxxxxxxxxxx (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
.



Relevant Pages

  • Oracle and PHP with Cursors
    ... we are using Oracle and PHP for a Web application. ... We are using ref cursors to return data from oracle ... every row is request with one call to oracle. ...
    (comp.databases.oracle.misc)
  • Re: Oracle scheme
    ... > rbscheer@my-deja.com (Robert Scheer) wrote in message ... > found that Oledb does not support Oracle cursors. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Oracle cursor help
    ... DELETE/WHERE clauses consume too many resources. ... I can also limit the row set up front with a pretty simple WHERE clause -- whatever is more efficient is what I'm aiming for (it wasn't clear to me if limiting up front with WHERE clauses defeated the efficiency of cursors ...) ... Can you work with the parallel options (Oracle Enterprise Edition)? ...
    (perl.dbi.users)
  • Re: Max Cursor error using Oracle
    ... adapter and increasing the OPEN_CURSORS variable to a higher number ... When too many cursors are opened, I receive the max cursor error. ... We are currently using .NET 1.1 and Oracle 9. ... Are you using the Oracle .Net driver, or the one built into VS? ...
    (microsoft.public.dotnet.languages.vb)
  • Oracle Client, stored procedures and Cursor release.
    ... Does anybody know if it possible to force Oracle to release cursors that ... ie My app makes a call that populates a field in a datagrid row ... so it does take more than a few grid refreshes before you hit ...
    (microsoft.public.dotnet.languages.vb)