Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to Optimize my Select
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00443007
Message ID:
00443015
Views:
24
Hey Cathi! Long time no see! Hope you're doing well!

I won't bother you with the obvious (join fields indexed, etc.)

This has happened to me a lot, so nowadays I barely even look at the results from sys(3054). Especially when I know that the view must be subject to some optimization.

If the query runs fast, my guess is that it's being optimized and I ignore the results from sys(3054).

I noticed also that if you open the tables (use this, use that) and explicitly set the order to the tags that should be involved in the optimization, sys(3054) seems happy.

Do a search with "alex" and "rushmore" and you should find another thread I started some months ago with the same question.

Have fun!

Alex


>Here is a simple select statement:
>
>select mtrandata.*,mtranitem.*,mtrancount.* ;
> from mtrandata,mtranitem,mtrancount ;
> where mtrandata.trandataid=mtranitem.trandataid and ;
> mtranitem.trandataid=mtrancount.trandataid ;
> INTO CURSOR TMPMERCH
>
>
>Each of the tables have an index on TRANDATAID. When I run SYS(3054,11) it comes back with the following:
>
>Rushmore optimization level for table mtrandata: none
>Rushmore optimization level for table mtranitem: none
>Rushmore optimization level for table mtrancount: none
>Joining table mtranitem and table mtrancount using index tag Trandataid
>Joining table mtrandata and intermediate result using temp index
>
>I don't undertand why this join is not optimized. The fields joined are very simple and straight-forward.
>
>Thank you for any help.
Low-carb diet not working? Try the Low-food diet instead!
Previous
Reply
Map
View

Click here to load this message in the networking platform