Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: update statement PL/SQL
Paul wrote:
>
> Serge Rielau <srielau_at_ca.ibm.com> wrote:
>
>
>
>>>Sorry, I may be confused here - am trying to learn PL/SQL. The book >>>Learning Oracle PL/SQL by Bill Pribyl with Steven Feuerstein makes use >>>of cursors - what's so bad about them?
>>In a nutshell a cursor is an API that connects the relation model of SQL >>with the procedural model. Whenever you cross models there's an >>impedance mismatch. >>Statistically developers learn procedural concepts first (VB, C, Java, >>..) and have a hard time internalizing relational concepts, so they tend >>to code procedural. >>However RDBMS shine in relational optimization and execution. So using >>an excess of procedural code (resulting in many cursors) is an indicator >>for bad exploitation of the RDBMS.
The compiler will have great difficulties recognizing such options in procedural logic because it must prove that order of execution does not matter. In pure SQL order of processing within a set does not matter by defintion unless explicitly specified (e.g. OLAP using an ORDER BY clause). In procedural logic the opposite holds true. Compiler technology for high performance parallel logic is a black art for good reason.
Cheers
Serge
-- Serge Rielau DB2 SQL Compiler Development IBM Toronto LabReceived on Fri Apr 29 2005 - 09:23:08 CDT