Query Optimization 
Author Message
 Query Optimization

sys(3054) is taking the Set Deleted filter into account.
While there are different opinions about pros and cons
of having a separate index on deleted(), you may want
to either Set Deleted Off or add such an index to your
cdx to let sys(3054) change it's mind.

-Stefan


Quote:
> Hi!,
> I am having a problem with query optimzation. I use sys(3054) to check my optimzation level and it always gives me partial level.

Here is the example of my query:
Quote:

> sele * from client where city = "New York"

> (client.dbf has index on city). and it gives me partial optimization level. Is there anything else I have to setup to get fully
optimization level?

> Thanks.



Mon, 26 Jan 2004 04:27:50 GMT  
 Query Optimization
Sunny,

To go a little further with what Stefan said, adding and index on DELETED()
will give you "full" optimization but will not necessarily make your query
faster. In fact, it might make it slower, depending on the number of deleted
records. The same is true for an index on any field that has only a small
number of discrete values, such as gender.

--

Cindy Winegarden  MCSD, Microsoft MVP


Hi!,
I am having a problem with query optimzation. I use sys(3054) to check my
optimzation level and it always gives me partial level. Here is the example
of my query:
sele * from client where city = "New York"
(client.dbf has index on city). and it gives me partial optimization level.
Is there anything else I have to setup to get fully optimization level?
Thanks.



Tue, 27 Jan 2004 07:55:01 GMT  
 Query Optimization
Hi,

To achieve full optimization, you are required to have a Tag on DELETED().
However, if you are on a network and have relatively few deleted records, it
can sometimes cause the query to run slower. This is because Foxpro must
download the entire Index anytime a query is performed.

Best regards,
Tom


Quote:
> Thanks a lot Stefan and Cindy, It works.

>   Hi!,
>   I am having a problem with query optimzation. I use sys(3054) to check

my optimzation level and it always gives me partial level. Here is the
example of my query:
Quote:

>   sele * from client where city = "New York"

>   (client.dbf has index on city). and it gives me partial optimization

level. Is there anything else I have to setup to get fully optimization
level?
Quote:

>   Thanks.



Wed, 28 Jan 2004 05:13:05 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Query Optimization

2. Query Optimization

3. Optimization question

4. optimization

5. Optimization

6. FoxPro 2.6 for DOS, code optimization

7. Rushmore optimization ?

8. JOIN Optimization

9. Help with optimization

10. VFP Rushmore optimization not kicking in

11. Search optimization

12. SQL statement optimization

 

 
Powered by phpBB® Forum Software