Hello.
>but when I use FORCE INDEX (idx_uid_del) then it is ok and takes >0.01seconds.. how can I manage that mysql use this index without force Have you run ANALYZE TABLE for you tables? See: http://dev.mysql.com/doc/refman/5.0/en/analyze-table.html Marko Knezevic <[EMAIL PROTECTED]> wrote: >mm, we already have all mentioned indexes. >idx_id (for users: id) >idx_id (for accouns: id) >idx_uid_del (for accounts: assigned_user_id, deleted) >idx_phoff (for accounts: phone_office) > >This query on 600.000 records takes 9.30 seconds.. > >this is what explain says: >table accounts, type all, key null, rows 465230, extra: using where; using >filesort >table users is ok - using primary index... > >but when I use FORCE INDEX (idx_uid_del) then it is ok and takes >0.01seconds.. how can I manage that mysql use this index without force >index ? >Is it possible ? > >thanks. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [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]