Re: Performance of big table

2004-07-21 Thread Batara Kesuma
Hi Harald, > Replacing the index on member_id by a compound index on (member_id, > id) might help. Thank you very much for your suggestion. After replacing the index with compound index, the query works very fast now. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mys

Re: Performance of big table

2004-07-21 Thread Brent Baisley
Have you tried playing around with your configuration parameters, specifically the sort buffer? I'm guessing that what is making the query slow is not the search, but the sorting of 9k rows if I read your results right. Easy enough to test, just drop the ORDER BY and see how long it takes. If i

Re: Performance of big table

2004-07-21 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Batara Kesuma <[EMAIL PROTECTED]> writes: > Hi, > I use InnoDB for my table, and I think I have hit the point where I > can't do query optimization any more. > The query is as simple as below: > SELECT SQL_NO_CACHE diary_id, LEFT(body, 28) AS body , id FROM > diar

Performance of big table

2004-07-21 Thread Batara Kesuma
Hi, I use InnoDB for my table, and I think I have hit the point where I can't do query optimization any more. The query is as simple as below: SELECT SQL_NO_CACHE diary_id, LEFT(body, 28) AS body , id FROM diary_comment WHERE member_id='343' ORDER BY id DESC LIMIT 15; And it took about 5 seconds