[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Newbie questions about dynamic query preparation in ABL

  • Thread starter Thread starter gus bjorklund
  • Start date Start date
Status
Not open for further replies.
G

gus bjorklund

Guest
> On Jun 7, 2019, at 12:03 PM, James Palmer wrote: > > Another point, you talk about dynamic queries being compiled on the fly. They are not. They are compiled at compile time. They are evaluated on the fly. This is quite different from compiling them on the fly. Well ... almost. Dynamic queries a compiled when you do QUERY-PREPARE. >> instead of using iCustNum as an argument, you have to bake in the current *value* : "FOR EACH customer WHERE CustNum = " + STRING(iCustNum). But this is repeatedly changing ... in a very important way. While it may seem like a trivial change, there is an index on the customer number and when you change customer number in the where clause, that changes the index equality bracketing (or range backeting) that must be used for the query. Doing that requires re-analysing the query so it has to be prepared again. Of course, lareger changes in the where clause will have even bigger effects.

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