SunQuest
           Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 12th, 2004, 06:04 AM
Christophe Ollier Christophe Ollier is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 2 Christophe Ollier User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
cursor fetch performance

Hello,

I have performance problems with Oracle 9i.

A stored procedure returns a cursor as an OUT parameter :

Code:
CREATE my_proc (
  curs OUT TYPES.type_my_curs
)
AS
BEGIN
  OPEN curs FOR
    SELECT DISTINCT...
    FROM ...
    WHERE ...
    ORDER BY ... ;
END;


The query is optimized, the select alone takes less than a second to execute.

Here is an extract from the package :

Code:
CURSOR my_curs IS
  SELECT ...
  FROM ...;
TYPE type_my_curs IS REF CURSOR RETURN my_curs%ROWTYPE;


My problem is, when I try to FETCH results from my cursor, the time to execute climbs to more than a minute...

Code:
declare
  my_c TYPES.type_my_curs;
  my_var ...
begin
  my_proc(my_c);
  loop
    exit when my_c%NOTFOUND;
    fetch my_c into my_var;
  end loop;


Anyone has an idea ? Thanks in advance !

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > cursor fetch performance


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway