Performance of OR queries

classic Classic list List threaded Threaded
3 messages Options
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Performance of OR queries

asked by john smith

This is a fact...

OR queries are very slow with cache.query(). It has to do with how H2 and indexes work. If you use UNION rather then OR, queries with cache.query will be super fast!

It was driving me nuts. I double triple checked my cache config made sure that I had indexing on my model etc...

Then I remebered that Ignite uses H2 as it's indexing mechanism so I read around H2 performance and they indicated to use UNION rather then OR

Cross your fingers trying to index 50,000,000 plus on the grid and query against it :P

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Performance of OR queries

commented by john smith

Yep UNION is faster then OR

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Performance of OR queries

commented by john smith

I think this should be put in the docs.

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

Loading...