Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Performance Question:Forced sortign Vs. MIN/MAX?
Which method to use to retrieve the minimal entry from a large table?
select min(field) from table where conditions; or B. A forced sorting select with a where condition of ROWID<2? select field from (select field from table where conditions order by field ) where ROWID < 2;
The table is very large with many millions of rows. The conditions are complex (including a sub query of "not exists select 'X' from same table", to get only the most recent data for any given date. And of course the select is not from just one table, but a JOIN of three tables) Received on Wed Aug 28 2002 - 09:05:22 CDT
![]() |
![]() |