mysql - Query execution is taking too long -


I currently have two tables in a database Called emails in both unread and non-spoken tables have a column called Email I want to compare these two tables and wherever in the email matches I want to update the columns in the email table, which is called e-mail_status_id2 ... the query I am using is

< Pre> UPDATE email E SET E.Email_status_id = 2 where e-mails (U.S. U.S. Select this option);

I am currently using mysql

There are 2704569 rows of emails in the e-mail table and 12102 rows of emails in the table without any breaks

Text "itemprop =" text ">

The first thing is that Reminders (email) :

  create index id_unsubscribed_email on allowed subscription (email); Or, better than that, declare it as the  primary key , especially if it is the only column in the table. 

Then, MySQL sometimes performs a poor job of applying in There are several ways to write queries to use the index. is present is a specific method:

  Update email and set up email_status_id = 2 where it is available (Select Unsubscribe U from where u.email = e.email );  

The included version should have the same performance with the index.

Edit:

The query can also help with the email (email) query For some reason, I assumed that it was already in the table Only important will be important.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -