RE: mysql_performance

2005-04-24 Thread mathias fatene
I may help you to execute your query in less than 20mn. Question : count(*) from EMP = ? Mathias -Original Message- From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: dimanche 24 avril 2005 17:39 To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: mysql_performance Moemen, You a

Re: mysql_performance

2005-04-24 Thread Peter Brawley
Moemen, You assign a string _position_ result from LOCATE to a SUBSTRNG _length_ argument. Is that what you mean? Do you have indexes on persons.item_id, emp (item_id, item_type, f2, f6, f7)? Once there are such indexes, try ordering the WHERE ... ANDs to correspond to those keys so the optimis

mysql_performance

2005-04-24 Thread moemen saad eldeen
Dear all, I have a problem running this query "select distinct T1.item_id, T1.f2 from Persons as T1 , Emp as T2 , Emp as T3 where T1.item_type='6.' and T2.item_type='6.1.9.' and T3.item_type='6.1.' and T2.f2 like '1.1.16.%' and substring(T2.item_id,1,LOCATE('.',T2.item_id))=T1.item_id a