-
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.
-
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.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|