DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Cursors, bad performance ??

  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Post Cursors, bad performance ??

    Hi,
    I' m new on DBA, and i' like to know if it's like this, that cursors have bad performance. the application that oracle use has a lot of cursors.
    This application has a very bad performance. So Cursors can be the problem. Does it right ???

    how can i eliminate the use of cursors. ??

    Thanks.

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Cursors are just a thing, neither good nor bad. If your application has a generic performance problem then use statspack to identify the top causes. One common problem is not using bind variables -- that prevents scalability like nothing else.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by danielhl
    Hi,
    I' m new on DBA, and i' like to know if it's like this, that cursors have bad performance. the application that oracle use has a lot of cursors.
    This application has a very bad performance. So Cursors can be the problem. Does it right ???

    how can i eliminate the use of cursors. ??

    Thanks.
    Poorly written cursors can be a problem. Well written cursors are fine. How do you know if a cursor is written well??? Here are some tips. Cursors that consist of a bunch of strings concatenated together cause hard parses. If they get called a lot that would be a problem for performance. A cursor is really a select statement in PL/SQL, if the query is inefficient in SQL Plus it will be inefficient as a cursor. So tune your queries and use bind variables when possible. You can use DBMS_PROFILER in testing your stored procedures. If you use that with SQL Navigator, you will get a pretty graphical display telling you where all of the time was spent.

    But saying cursors are bad as a broad statement is patently false.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width