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: how to tune up this query?

Re: how to tune up this query?

From: Thomas Niering <thomas.niering_at_arcor.de>
Date: 30 Jan 2003 07:56:00 +0200
Message-ID: <8eq51sKYXzB.thomas.niering@arcor.de>

Hallo Susan,

> I have a 3 million records table. I want to retrieve the first
> 1000 records of the lowest number of priority.

You need no subquery:

> SELECT id, name, priority
> FROM table_name
> WHERE stage = 'start' and state = 1
> and rownum <= 1000;

Ciao Thomas Received on Wed Jan 29 2003 - 23:56:00 CST

Original text of this message

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