Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UDF's second rate citizen in Rushmore ?
Message
From
17/09/2006 06:43:16
 
 
To
16/09/2006 20:19:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01151219
Message ID:
01154458
Views:
43
Hi Aleksey,

>The optimization algorithm is rather complex, it takes many variables into account: reccount(), optimized filter conditions, existing indexes, memory, the nature of the join conditions, etc.

And you probably try to tweak it sometimes, so documentation would grow into a moving target - I was afraid of that <g>. I also realize that there are quite different scenarios/developer practices which would be quite difficult to cover. But efficiently using indeces is probably the best way to guarantee that apps tested only on medium data sizes don't show lousy performance when used with large data sizes. So perhaps sys(3054)could be enhanced a bit with a "verbose" setting. In a german vfp news group were 2 threads in the last week on "how/when is a query optimized" - there is interest in the topic.

idea 1: spell out the alias of the intermediate file - benefits:
a) this would make following rearranged join order on queries with many steps easier if the alias is given as source and target like
"Joining table dp and table ne using index tag Recid_n into intermediate result H"
"Joining intermediate result H and table vh using index tag Recid_v"
especially when there are many intermediate results involved.

b) if I land in the debugger or force the program to be there, I can easily check the still open cursors without first rechecking the fields inside - I can know what they are as if I had spelled out single step operations.

idea 2: give some info on the key expression of the temporary index *and* the alias it is created on.

idea 3: whenever vfp changes join order print out a line with the reason.

Icing on the cake would be a write out the equivalent of the SQL vfp rearranged the query into (with the force option present<g>). This could be helpful if I only wanted to change a tiny bit of a query vfp rearranged almost totally.

My hope is that there are more internal asserts/logging/tracing options in the vfp code with text on "what's happening now" already defined, which could be reused in a "verbose" setting of sys(3054).

regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform