pillai.ganesh
19th August 2011, 13:25
Can any body explain me how a Baan SQL query is processed by baan database driver?
Hitesh Shah
19th August 2011, 19:58
While it's difficult to tell exact procedure how the sql query is processed by db driver , one can imagine how it would be processing based on the syntax of baan sqls , syntax of underlying db and the features of baan db driver. While converting baan sql to db sql , db driver takes care of performance cost optimisations , company numbers , hints , joins , unions , pattern matching conditions etc. Best guide could be baan's manual of baan sql syntax and baan db driver in this regard.
pillai.ganesh
2nd September 2011, 09:07
Thanx sir for you valuable Reply.
But just wanted to know how order by <index name> can improve query performance in baan?
As it wont help in filtering of records!
mark_h
2nd September 2011, 17:30
My understanding(and I could be wrong) but for something like Oracle the db driver might decide to use one index(and it might not be the best index) and the order by forces it to use the index you included.
zardoz
7th September 2011, 12:01
My understanding(and I could be wrong) but for something like Oracle the db driver might decide to use one index(and it might not be the best index) and the order by forces it to use the index you included.
I agree. Every time you use an order by index the db driver forces the db to use it also for the selection, so, by example, if the better 'search' is by index1 (and you imagine that this lead to a fast index search) and you must also order by index2 this can lead to an implicit full table scan you can be unaware.
Almost this happens in BaanIV and Oracle. In LN you can use the HINT statement to force the use of appropriate index instead.