From: mcstockX@Xenquery   
      
   "Mark D Powell" wrote in message   
   news:2687bb95.0406081201.6ce82c05@posting.google.com...   
   | "Tomislav Petrovic" wrote in message   
   news:...   
   | > 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 --   
      
   Tomy   
      
   Good answers, but actually, you should spend your tuning time on things that   
   have a lot more impact -- like making sure indexes are used where   
   appropriate rather than full table scans, and there are no unnecessary   
   PL/SQL loop iterations, your SGA is properly sized, your sorts are tuned,   
   etc. etc.   
      
   ++ mcs   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|