quarta-feira, 3 de junho de 2009

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';

Nenhum comentário:

Postar um comentário

Linux bash file returns unexpected token `$'do\r''

open file in vi edit with   vi filename.sh   command; type in vi  :set ff=unix  command; save file with  :wq It will save the file with unix...