I have a query that joins with a virtual table where the optimizer has a choice
of picking between 2 indexes for something, and it picks by far the wrong one.
I'm trying to understand how it all works.
I understand the output of both 'explain' and 'explain query plan' but I can't
see from either of those why it will choose one plan over another. Subsequently
I don't really know where my estimatedRows and estimatedCost from my virtual
table comes into play with the decision so it's hard developing an intuitive
feeling for what the correct values are to return.
Is there a way that I can view the cost metrics that goes into each query plan
choice to see how it calculates the best index?
sqlite-users mailing list