Home » RDBMS Server » Server Administration » Inefficient cursor
Inefficient cursor [message #372702] Sat, 03 March 2001 16:23 Go to next message
kayode Ogunmoroti
Messages: 2
Registered: March 2001
Junior Member
I have written a plsql program that will be executed weekly and accesses approximately 500k records for reporting.
This program tends to be very slow, and i am wondering if a cursor is limited in the amount of record it can handle and what is the work around.
Re: Inefficient cursor [message #372735 is a reply to message #372702] Tue, 06 March 2001 10:18 Go to previous messageGo to next message
kavithask
Messages: 34
Registered: March 2001
Location: London
Member
Hi,

Tune the SQL used for the cursor. See if the SQL uses a full table scan. If it does, then create necessary index and see if the cursor fetches rows within 2-3 minutes.

If it is still slow, then please post the code here, and let me see if I can help.

HTH
Kavitha
Re: Inefficient cursor [message #372744 is a reply to message #372735] Tue, 06 March 2001 14:02 Go to previous messageGo to next message
Kay
Messages: 3
Registered: March 2001
Junior Member
Thanks for that, the cursor actualy fetches fairly quickly - 2 secs approx - it does not require an index 'cos it returning distinct customer_number and it does an index range scan for the date range required.
Any other suggestions ?
Re: Inefficient cursor [message #372763 is a reply to message #372735] Wed, 07 March 2001 08:55 Go to previous message
kavithask
Messages: 34
Registered: March 2001
Location: London
Member
Hi,

If the cursor is quick, then the next thing would be is to check the PL/SQL logic. Maybe you can paste the psuedo-code in here and I can have a look at it.

Kavitha
Previous Topic: Problem with own type and procedure
Next Topic: Re: retriving particular rows in order - Thanx
Goto Forum:
  


Current Time: Sat Jun 29 13:54:40 CDT 2024