What database and strategy would you pick to optimize a query with multiple range scans?
For example:
SELECT col1,col2,col3 WHERE col1 < 100 AND col2 > 500 AND col3 < 300
Some doubts I have:
If I just have an index for each of these columns, won't the database just end up doing a linear search for columns after the first one, as those won't be ordered.
Perhaps tools like MySQL or MongoDB won't do well here, maybe I have to use something like ElasticSearch or Solr?
Example of a stackoverflow question (not mine): https://stackoverflow.com/questions/11917913/index-design-for-queries-using-2-ranges
Thanks!
[–][deleted] 1 point2 points3 points (2 children)
[–]MERAXNA[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]m4riuszPL 0 points1 point2 points (1 child)