Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing SQL Select problem
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00659128
Message ID:
00659520
Views:
22
Thanks, Barbara. SET DELETED was exactly what the problem was!


>The only times I've heard of this is when the environment settings in one situation are different from the other. Is the PRG that you're testing this under the same one you compile into the EXE? BTW, the first setting I'm always suspicious of in cases like this is SET DELETED.
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform