Hi all,
The execution plan for this query [1] indicates that it will be entirely
based on existing indexes. Yet in practice, the query takes a long time to
run. Why is that?
Also, interestingly, the execution plan for this modified version [2] is
identical, but it runs almost instantaneously.
Lastly, I expect that last query to return no results (because the NOT
EXISTS condition should not be met) but it does return a row. Why is that?
Thanks!
Huji
[1]
https://tools.wmflabs.org/sql-optimizer?use=enwiki_p&sql=use+fawiki_p%3…
[2]
https://tools.wmflabs.org/sql-optimizer?use=fawiki_p&sql=select%0D%0A++…