Hi Try to check your query by this command
explain select * from holder, management where holder.id=management.id or (holder.name=management.name and holder.surname=management.surname) order by holder.no and let take a look the result if they say the result come from ALL record it mean you can't get the benifit of index Kittiphum Worachat,MT. www.hatyailab.com > Hi, > I have problem with these query: > > select * from holder, management where holder.id=management.id or > (holder.name=management.name and holder.surname=management.surname) order > by holder.no > > It take a long time (more than 1 minute) with thousand record. I have > index within 2 table (name+surname, id). It did not have problem if I > check only id or name+surname. > > SF > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php