Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sybase vs Oracle - which is better?

Re: Sybase vs Oracle - which is better?

From: Karl Zdero <zderok_at_viaginterkom.de>
Date: 1998/11/20
Message-ID: <36559615.495A6891@viaginterkom.de>#1/1

Well, people saying that its bad to use cursors obviously have not been working with large databases.

Example 1 (Sorry the poor pseudo)



Consider a simple example where you need to update every row in a really HUGE table.
Yes one could simply write,

       UPDATE table SET col='x'
then wait and wait and wait and the KAPOW the ROLLBACK segment fails and your'e back to square one.
Better then to use a cursor eh!

     open cursor
     while more
         fetch
         update
         if counter = 1000
             commit

    end while

Example 2 (a bit more absurd, but can't be done without a cursor)



You need to check a table with filenames embedded in the colums. You want to remove those rows whose file's no longer exist!

open cursor
while more

    fetch
    answer = systemcall(does filename exists)     if answer=no

        delete row
end while

-
Now leads me on to the question why ORACLE is better than SYBASE in this regard.
Simple answer ROWID.

I don't think SYBASE has a rowid.

>
Received on Fri Nov 20 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US