Mysql query optimization for large table joins?

As discussed in the comments, your query doesn't actually do what you want it to do. Given the data you have, I would personally process this outside of SQL to create a table to store how many people listened to each song, which you can then query in SQL to get this information. If you absolutely want an SQL query to do this however, it will need to be something along the lines of this monstrocity.

Use INNER JOIN instead of using correlated subquery as.

Try general tuning of mysql and innodb engine to allow for faster data changes.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions