Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with the optimization
Message
From
16/12/2006 15:52:04
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
16/12/2006 15:09:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01178287
Message ID:
01178294
Views:
19
>But, here is the interesting part. If I add another set of fields after Item.AI, the result is fully optimized:
>
>
>SELECT Member.*,Item.AI,Status.* FROM Member;
> INNER JOIN Status ON Member.NoStatus=Status.Numero;
> INNER JOIN Item ON Member.NoDBUsers=Item.Numero;
> WHERE Item.Numero=3042 AND Member.NoEntity=1 AND;
> (Status.Numero=2 OR Status.Numero=9 OR Status.Numero=3 OR Status.Numero=5 OR Status.Numero=16)
>
>
>So, this shows that there is something buggy in the way the engine works. This could be affected on some data corruption, bad tags or something like that. But, it just doesn't make any sense that I will get an immediate result just because I add Status.* at the end of the field list.

Caching will happen because the second set of joins and the where clause is the same as the first. SQL Server does the same thing via "Simple Parameterization"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform