Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing SQL Select problem
Message
From
20/05/2002 17:25:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Optimizing SQL Select problem
Miscellaneous
Thread ID:
00659128
Message ID:
00659128
Views:
43
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
Map
View

Click here to load this message in the networking platform