MySQL pesquisa mais rapida

Indices lose their speed advantage when using them in OR-situations:

SELECT * FROM a WHERE index1 = 'foo'
UNION
SELECT * FROM a WHERE index2 = 'baar';

is much faster than

SELECT * FROM a WHERE index1 = 'foo' OR index2 = 'bar';

Comentários

Postagens mais visitadas