"Yann GAUTHERON" <[EMAIL PROTECTED]> wrote: > ID_LOGIN is an integer > > Can anyone say me if this : > > WHERE index1=ID_LOGIN OR index2=ID_LOGIN > > must be slower than those 2 queries : > > WHERE index1=ID_LOGIN > WHERE index2=ID_LOGIN > > for a 20 000 rows table ?
You can rewrite the first query with UNION or with TEMPORARY tables: http://www.mysql.com/doc/en/Searching_on_two_keys.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]