3 ms·
You can use multiple indexes in some queries. The case you described will work. However you can't use multiple indexes from the same table. For example: tabl
by jdoliner 13y ago
You can use multiple indexes in some queries. The case you described will work. However you can't use multiple indexes from the same table. For example:
table.between(...).between(...)
won't work. You'd have to use a filter (and thus a linear scan to do the second between. This seems like it would be a good thing for us to add to the FAQ because the rules on it can be a bit complicated. However the best way to find out might actually just be to try. Because we're not using an optimizer in the background you have to explicitly say which indexes you're using and thus they system will just refuse to do queries if it can't use indexes the way you're asking it to.