dbTalk Databases Forums  

OCI prefetching REF CURSORS

comp.databases.oracle.server comp.databases.oracle.server


Discuss OCI prefetching REF CURSORS in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
remius@lycos.es
 
Posts: n/a

Default OCI prefetching REF CURSORS - 05-22-2007 , 07:01 AM






Hi All,

My application connects to an Oracle Server 9i via OCI.
I have all my select statements on stored procedures, for this I use
REF CURSOR to return the result sets.
It is working correct but in some cases, because one trip to the
server is needed for each row returned by the stored procedure, is
very slow.

Is there any way to enable prefetching of rows when using stored
procedures and REF CURSORs ?
If not, is there any other possiblity to improve perfomance when using
ref cursor ?

Thanks in advance...


Reply With Quote
  #2  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: OCI prefetching REF CURSORS - 05-22-2007 , 07:41 AM






On Tue, 22 May 2007 05:01:50 -0700, remius wrote:

Quote:
Hi All,

My application connects to an Oracle Server 9i via OCI. I have all my
select statements on stored procedures, for this I use REF CURSOR to
return the result sets. It is working correct but in some cases, because
one trip to the server is needed for each row returned by the stored
procedure, is very slow.

Is there any way to enable prefetching of rows when using stored
procedures and REF CURSORs ?
If not, is there any other possiblity to improve perfomance when using
ref cursor ?

Thanks in advance...
Sounds like the array interface. You should bind (define?) the parameters
to the array variables and fetch into the arrays. I remember somebody
nagging and requesting the very same thing for Perl DBI.



--
http://www.mladen-gogala.com


Reply With Quote
  #3  
Old   
Valentin Minzatu
 
Posts: n/a

Default Re: OCI prefetching REF CURSORS - 05-22-2007 , 09:40 AM



On May 22, 8:01 am, rem... (AT) lycos (DOT) es wrote:
Quote:
Hi All,

My application connects to an Oracle Server 9i via OCI.
I have all my select statements on stored procedures, for this I use
REF CURSOR to return the result sets.
It is working correct but in some cases, because one trip to the
server is needed for each row returned by the stored procedure, is
very slow.

Is there any way to enable prefetching of rows when using stored
procedures and REF CURSORs ?
If not, is there any other possiblity to improve perfomance when using
ref cursor ?

Thanks in advance...
You may also want to take a look at OCI_ATTR_PREFETCH_ROWS and/or
OCI_ATTR_PREFETCH_MEMORY.



Reply With Quote
  #4  
Old   
remius@lycos.es
 
Posts: n/a

Default Re: OCI prefetching REF CURSORS - 05-22-2007 , 11:07 AM



On May 22, 2:41 pm, Mladen Gogala <mgogala.SPAM_ME.... (AT) verizon (DOT) net>
wrote:
Quote:
On Tue, 22 May 2007 05:01:50 -0700, remius wrote:
Hi All,

My application connects to an Oracle Server 9i via OCI. I have all my
select statements on stored procedures, for this I use REF CURSOR to
return the result sets. It is working correct but in some cases, because
one trip to the server is needed for each row returned by the stored
procedure, is very slow.

Is there any way to enable prefetching of rows when using stored
procedures and REF CURSORs ?
If not, is there any other possiblity to improve perfomance when using
ref cursor ?

Thanks in advance...

Sounds like the array interface. You should bind (define?) the parameters
to the array variables and fetch into the arrays. I remember somebody
nagging and requesting the very same thing for Perl DBI.

--http://www.mladen-gogala.com
Hi, thanks for your answer...

do you know where I can find any example about array binding ?

Thanks.




Reply With Quote
  #5  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: OCI prefetching REF CURSORS - 05-22-2007 , 10:33 PM



On Tue, 22 May 2007 09:07:01 -0700, remius wrote:

Quote:
do you know where I can find any example about array binding ?

Thanks.
http://tinyurl.com/2lm5c4
http://tinyurl.com/3d5y39


--
http://www.mladen-gogala.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.