php - Query takes too much time to execute -
i have issue query take time execute. query
select u.user_id, c.c_id, u.username, u.email, r.reply users u, conversation c, conversation_reply r case when c.user_one =1 c.user_two = u.user_id when c.user_two =1 c.user_one = u.user_id end , c.c_id = r.c_id_fk , ( c.user_one =1 or c.user_two =1 ) order c.c_id desc
i have 250788 total recoderds in conversation_reply table store message details query give 10225 records in result , take 7.291 sec.
please give me proper solution.
you can tell database forcefully use index. below
use index (index1,index2)
Comments
Post a Comment