Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3978790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:05:27+00:00 2026-05-20T05:05:27+00:00

Running this on MySQL 5 (Amazon RDS) on a large instance (i.e. very powerful),

  • 0

Running this on MySQL 5 (Amazon RDS) on a large instance (i.e. very powerful), this query takes 16 seconds to execute. This InnoDB table has about 2 million rows.

DELETE FROM quiz_multichoice_user_answer_multi WHERE
user_answer_id IN( SELECT id FROM
quiz_multichoice_user_answers WHERE question_nid =
1001700 AND question_vid = 1002731 AND result_id =
64003 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:05:27+00:00Added an answer on May 20, 2026 at 5:05 am

    Rewrite it to use JOINs instead of a subquery and see if that improves things. It often does with MySQL; the query planner is better at optimizing joins, and choosing good indexes when they’re used, for whatever reason.

    DELETE 
      quiz_multichoice_user_answer_multi
    FROM
      quiz_multichoice_user_answer_multi
    INNER JOIN
      quiz_multichoice_user_answers
    ON
      quiz_multichoice_user_answer_multi.user_answer_id = quiz_multichoice_user_answers.id
    WHERE
      quiz_multichoice_user_answers.question_nid = 1001700
    AND
      quiz_multichoice_user_answers.question_vid = 1002731
    AND
      quiz_multichoice_user_answers.result_id = 64003
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running this mysql query: $result = mysql_query(SELECT * FROM userdetails WHERE userid=
I am running this query on MySQL SELECT ID FROM ( SELECT ID, msisdn
I am running this MySQL query against my db that contains a lot of
I have a table in mysql, say table1. I am running this on it:
I have a staging Rails site up that's running on MySQL 5.0.32-Debian. On this
This MySQL script installs multiple triggers. It works on one machine running MySQL 5.0.51b-community.
I am running this query to set up a VARBINARY (I wish for it
I've got a webserver running quite standard Apache/php/MySQL and want to connect to this
Running this SWL query keeps returning: #1064 - You have an error in your
Following the instructions at http://aws.amazon.com/articles/1663?_encoding=UTF8&jiveRedirect=1 I created an instance with mysql's dbs running on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.