Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help to Speed up SQL
Message
 
To
12/03/2002 14:05:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00629818
Message ID:
00631691
Views:
24
Hi Bill,

>If I understand you right, the TRUE time that my query takes is the first time I run it.

Yes.

>Switching to a different application (while VFP is waiting at the command window) switches VFP to background buffer and throws out the foreground information.

VFP is reducing its buffer from the foreground size to the background size. Since the background buffer is usually smaller, VFP has to throw out everything that doesn't fit in.

>I just test that idea, by equalizing both foreground and background buffer, and sure enough it ran the query at the same speed each time.

Now that's great, at least for me. *bg*

>So the speed of my query is a function of the design?

Basically, yes. There might be alternatives, depending on the application, but they probably require a different design. For example, you could use a trigger on table2 to upate a counter in table1. If you then had an index on that counter field, you could run an optimized query that would be faster.

Christof
--
Christof
Previous
Reply
Map
View

Click here to load this message in the networking platform