smarthaert / txquery

Automatically exported from code.google.com/p/txquery
Other
0 stars 0 forks source link

IndexNeeded not working for joins #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Does anyone use indexes with xquery?
On the help says it should work with joins, but the indexneeded event is not 
fired.

I have checked the code and it looks like the JOIN part is missing or deleted.

the code says: 
    { Check WHERE clause sections that can be optimized by using indexes
      JOINing has precedence over WHERE statement
      WHERE statement has precedence over an ORDER BY }

however, there is only 2 IFs above that, for the WHERE and the ORDER BY

If anyone have any experience with, i appreciate.
I using the original 1.86, but have also checked the updates from the group, 
they are the same.
I am using with titan for btrieve, with big files, so a index is very needed.

Thanks guys, and congratulations for the excellent work on xquery

Lucio

Original issue reported on code.google.com by lfeit...@gmail.com on 19 Nov 2011 at 1:04

GoogleCodeExporter commented 9 years ago
This kind of optimization is not so easy as the way the JOIN stuuf is 
implemented in txquery, first we have to ad an Optimization for JOINs like 
opUseIndex, opWhere, etc. the main problem is that the JOIN code only do an 
optimization (Sorting) for the first pair of fields, the rest is done doing a 
secuential search over all the dataset. We have plan to implement this 
optimization, is next subject to implement but is not easy to achieve for now 
(not enough spare time).

Original comment by fdue...@gmail.com on 12 Jun 2013 at 11:48