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: Ultimate Question: Oracle, MSSQL, Others vs MYSQL LIMIT Statement

Re: Ultimate Question: Oracle, MSSQL, Others vs MYSQL LIMIT Statement

From: Serge Rielau <srielau_at_ca.ibm.com>
Date: Mon, 30 Sep 2002 06:52:03 -0400
Message-ID: <3D982CD3.1050400@ca.ibm.com>


The reason that nothing along these lines is in the standard is that this page() function you propose exposes the physical layout of data on the disk to the application.
SQL is all about not doing that.
 From a more pragmatic angle dealing with pagenumbers and rownumbers can cause quite some confusion:
1) What if your favorite DBMS (starts to) support rows crossing pages 2) What if your row is stores outside of the DBMS (external table, nickname, ....)
3) What if your DBMS wants to support online reorg... Yoru rowids will chanhe in mid flight
4) What if someone deletes a record in the page you're on..

The way to walk through resultsets securly are scrollable cursors.

Cheers
Serge

-- 
Serge Rielau
DB2 UDB SQL Compiler Development
IBM Software Lab, Toronto

Try the DB2 UDB V8.1 beta at
http://www-3.ibm.com/software/data/db2/
Received on Mon Sep 30 2002 - 05:52:03 CDT

Original text of this message

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