General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Optimizing SQL Select problem
Greetings All,
I've encountered some interesting behavior with a SQL select in VFP 6.0 (querying FPDOS 2.6 tables): If I execute the select in the command window or execute it in a .prg in the debugger, it takes about .1 - .2 seconds to complete. But I execute the same statement compiled in an .exe, it takes on the order of 5-6 seconds. Anyone seen this before?
The select statement is of the form:
SELECT il.*,IIF(VAL(il.itemcode)=0,ir.item,ii.item) as descr from itemlist il ;
LEFT JOIN itemref ir ON ir.itemcode=il.itemcode ;
LEFT JOIN insitem ii on ii.pkey = il.pkey
WHERE il.pkey = cItemListKey;
and il.relateno = nRelateno and il.relatesu = cRelateSuffix ;
ORDER BY entno,entsuffix ;
into cursor csRelDocket
Thanks In Advance,
Keith Klein
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only