Performance query with Oracle dbase

  • Thread starter Thread starter Yves Van Walle
  • Start date Start date
Status
Not open for further replies.
Y

Yves Van Walle

Guest
ABL code below FIND LAST Order NO-LOCK. ... will be translated to Oracle queries below SELECT /*+ INDEX_DESC(T0 index field ) */ FROM ORDER T0 order by indexfield DESC ; SELECT /*+ INDEX(T0 index field ) */ field phrase FROM ORDER T0 WHERE index field = order id Should it be better to just get the last record from database in 1 Oracle query? Like Oracle query below. SELECT /*+ INDEX(T0 index field ) */ field phrase FROM ORDER T0 WHERE rownum 2 == The result is in both scenario’s the same, but the ‘cost’ from the second case is much less than the one in the first case

Continue reading...
 
Status
Not open for further replies.
Back
Top