"Tomislav Petrovic" <t.********@inet.hr> wrote in message news:<ca**********@garrison.globalnet.hr>...
Which is more expensive (slower), sorting data using NUMBER field or
using DATE field....
And how much more expensive?
Tomy.
Tomy, I believe that in the majority of cases the difference is
insignificant.
I used dba_ojects to populate a test table with 3 columns: the object
name for 30 char, the sysdate minus the rownum, and the object_id.
Then I selected * from my test table to populate the buffer.
Next I "set timing on" in sqlplus and did a select * from my_table
order by the_date and the_number one after the other. For 39,357 row
the run time differences were around 5/100 of a second with number
winning by just a tad.
You should be able to run some more tests, perhaps with a larger
sample size, and see.
HTH -- Mark D Powell --