Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing Query
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00578767
Message ID:
00578870
Views:
29
>>>Just for a fun can you try WHERE instead of JOIN?
>>>BTW, How many records are in the temp table and how big result set do you expect?
>>
>>I'll try at home with the test table. The temp table has 110 records. The main table has 5mln records. I think, the resulting set would be huge, may be 800000 recs. This is just a plain test, the live query uses 7 joins to tables, each of them has ~3-5mln. recs... :(
>>
>
>Just a guess, but it seems to me that foxpro doesn't have any reason to use index for temp table. It would rather scan it and use index on main table to get the related records. You should find some other way to limit the number of records in the result set.


What could be the other way? BTW, I've checked where idea, and the result is none for both tables. In my criteria form I construct where condition as a seria of INLIST command, if number of selected items less than max_number. I definied max_number as 72. If user selects more than 72 items, I use temp table idea...

What would be your suggestions?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform