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: SPOOKY SQL

Re: SPOOKY SQL

From: Julio Negueruela <julio.negueruela_at_si.unirioja.es>
Date: Mon, 24 May 1999 10:34:42 +0200
Message-ID: <37490F22.BAA37497@si.unirioja.es>

Arlette BROSSARD escribió:
> =

> Be careful with ROWNUM when you use an ORDER BY clause. It doesn't work=

> every times.
> =

> I had some problems with it, so I read in Oracle 7 RDBMS :
> =

> Oracle7 assigns a ROWNUM value to each row as it is retrieved, before
> rows are sorted for an ORDER BY clause, so an ORDER BY clause
> normally does not affect the ROWNUM of each row. However, if an
> ORDER BY clause causes Oracle7 to use an index to access the data,
> Oracle7 may retrieve the rows in a different order than without the
> index, so the ROWNUMs may differ than without the ORDER BY
> clause.

I'm not sure but think it would be corrected by selecting the rule optimizer:
alter session set optimizer_goal=rule;

Regards.
-- =

Julio Negueruela
DBA Servicio Informático

Universidad de La Rioja      -      Spain
Telf: 941-299179     Fax: 941- 299180

mailto:julio.negueruela_at_si.unirioja.es Received on Mon May 24 1999 - 03:34:42 CDT

Original text of this message

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