-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ilmari Karonen:
That may well be what's happening, but if so,
it's a bug in MySQL. Note
that both of the queries have identical WHERE clauses. Given that said
WHERE clauses match no rows, there's really no reason why any other part
of the SELECT should make any difference. No rows is no rows.
while i spent no time investigating this, a possible explanation is that
page_namespace and page_title can be loaded from the index, without touching
the data. but once you ask for page_is_redirect, a column not in the index
being used, it has to touch the data for each row to retrieve that field.
to put that another way: when your query's results can be retrieved using the
data already stored in the index, InnoDB will do that, and not touch the "real"
data at all.
it's usually faster, as the index is already loaded to do the query in the
first place.
- river.
-----BEGIN PGP SIGNATURE-----
iD8DBQFJLt93IXd7fCuc5vIRAqrBAJsHe9XTcDGL/vIAGBZ+Bj6pSVYv6wCdHhQ4
AJrwmNcKCTh76rZEMx+gH6Q=
=3Of/
-----END PGP SIGNATURE-----