Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why do queries take longer in a private datasession?
Message
From
21/07/1999 15:30:09
 
 
To
21/07/1999 15:19:11
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00244276
Message ID:
00244306
Views:
14
Are you sure that there is an index with the exact expression that you use on the left side of the where clause? I would put a suspend just before the select statement and examine imprn_rpt very carefully.

(Are there any openings down that way for a foxpro programmer? :-)

>Thanks to Todd and Tom for their execellent suggestions. By using SYS(3054,1), I was able to verify that the query is optimized in the default datasession, but not in the private datasession. The weird thing here is, the code is unchanged. The only change I made between test runs was to change the datasession type of the form from 2 to 1. So I'm guessing there's some property of the datasession itself that needs to be tweaked.
>
>Here's the code:
>
>
>
>*-- cmd_test.click
>*-- test running a filtered report
>local lcFilter, lcSaveAlias, lnSaveRec
>
>lcSaveAlias = alias()
>lnSaveRec = recno()
>if empty(set("filter"))
>	lcFilter = "PRINTNO = '" + thisform.txt_printno.value + "'"
>else
>	lcFilter = set("filter")
>endif
>
>use imprn in 0 again alias imprn_rpt shared
>select * from imprn_rpt into cursor rptcursor where &lcFilter
>report form reports\imprn_r1 preview
>
>select rptcursor
>use
>select imprn_rpt
>use
>
>select &lcSaveAlias
>goto lnSaveRec
>
>
>
>(NASM's not a bad place to be a programmer, Todd. As one of my former supervisors used to say, "The Smithsonian may not have money, but it has state-of-the-art problems.")
>
>Thanks,
>BEW
--Todd Sherman
-Wake Up! Smell the Coffee!
Previous
Reply
Map
View

Click here to load this message in the networking platform