1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to make below mysql query fast?

Discussion in 'Programming/Internet' started by Arun VM, Oct 8, 2018.

  1. Arun VM

    Arun VM Guest

    This is my mysql query which is too slow if i put it in server there is lot of records are existing how can i make this fast?

    $query2= "SELECT question.id,question.user_id,question.note_id,question.title,question.question,question.date,vote.vote FROM user_questions AS question LEFT JOIN user_question_vote AS vote ON vote.question_id = question.id WHERE NOT EXISTS(SELECT NULL FROM user_answers AS ans WHERE ans.question_id = question.id) ORDER BY question.id ASC LIMIT $offset, $no_of_records_per_page";

    Login To add answer/comment
     

Share This Page