Re: Does Oracle encourage developers to use cursors?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 24 Oct 2012 11:50:02 +0100
Message-ID: <19udnURLys1JWhrNnZ2dnUVZ7s2dnZ2d_at_bt.com>


If you want a useful answer to this question you probably ought to start from the assumption that the people you're talking to have no idea how SQL Server handles cursors (or what the term even means in SQL Server) and why they are considered slow. So tell us about cursors in SQL Server and we can tell you about the things that look different in Oracle.

It may come down to something as simple as "cursors imply row by row processing, which tends to be much slower than set-wise processing with simple SQL" - that's a statement that is essentially true in either environment. On the other hand you may have some completely different comparison in mind when you pose your question.

-- 

Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com/all_postings

Author: Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

<gnewsgroup_at_gmail.com> wrote in message 
news:4941cf9b-3831-4efe-9c8f-f13591b476d9_at_googlegroups.com...

| I've asked this at asp.net forum, but I think we have more gurus here to
get more educational, informative information about my confusion.
|
| I am new to Oracle, but not new to SQL Server and .NET application
development. I think it is a general understanding that we should try to avoid using cursors as much as possible at least with sql server, because it just doesn't perform that well.
|
| But if we read any Oracle PL/SQL primer, I bet you will be reading about
cursors after cursors.
|
| So, is cursor simply the established practice of Oracle to get our data?
Is oracle cursor internally different from that of SQL Server such that it doesn't cause any performance hit?
|
| Any thoughts? Thank you.
Received on Wed Oct 24 2012 - 12:50:02 CEST

Original text of this message