Huawei-Hadoop / hindex

Secondary Index for HBase
Apache License 2.0
591 stars 286 forks source link

Add hints to skip index table scan in case of range queries #39

Closed chrajeshbabu closed 9 years ago

chrajeshbabu commented 10 years ago

This can be implemented by passing Expression like SkipRangeScan as attribute to scan.

anoopsjohn commented 9 years ago

You mean even if index is there, user dont want to use it and go with full table scan?

chrajeshbabu commented 9 years ago

Yes Anoop, After evaluating filters if the index scan become range then we can give option to skip or continue using the hints. Otherwise some time we may end up scanning two tables.

anoopsjohn commented 9 years ago

If it is a range scan, the user will know it at scan client itself. (The Filter will be range based) There is already provision for user to pass attribute in Scan to Hint not to use Index at at all. Forgot the class name. So IMO this is already possible.

chrajeshbabu commented 9 years ago

Yes Anoop we have NoIndexExpression. But some cases even if the filters are range then internally after evaluation they can become equal queries. For example if a scan filter are like this column>=100 and column<=100 then after evaluating it will become equal query with filter column=100 so then we need not skip.

Yes it's of lesser priority..May be we can close also if not such important.

anoopsjohn commented 9 years ago

Yes that Filter on creation at client side itself, use can know it is equal or range condition na? Any way IMO NoIndexExpression is fair enough way.

chrajeshbabu commented 9 years ago

closing it Anoop.