Originally posted by msuresh
hi,
My query is select * from log_record order by tran_datetime desc;
This table is having millions of record.What to do now???
Weeeell - what are you going to do with them all?
- If YOU are going to read them all (talk to you again in 2015) then that's it, it will take a time, you're probably processing around a Gig.
- If a machine is going to read them all, are you sure you need them sorted at this point? Can the sort be postponed until the output is presented for human consumption? (An unsorted list would use a FULL SCAN which would be faster.)
It might be worth experimenting WITHOUT an index, FULL SCAN plus sorts would be used, the optimiser does not ALWAYS get it right (but it usually does better than I can!).
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman