sql - Optimizing my mysql statement! - RAND() TOO SLOW -


Then I have a table with more than 80,000 records, this is called a system I also have another table Which is as follows.

I need your statement to select random records from the system statement, where the ID is not already listed in the table under the existing user id.

> So what do I have here:

  select system.id, system.username, system.password, system.followed, system.isvalid, follows. Userid, exclude system.sysstemid from system except on system.ID = the following: SISIDID and the following types. URIID = 2 WHERE system.followed = 0 and system.isvalid = 1 and above Sistide ID Null Order of Rand () Ltd 200  

Now it is completely explosion Except that it takes about a full minute before it starts processing in the job with the chosen records. By this time the script usually takes some time and nothing happens.

Can anyone show me how it works, so only one idea has been done, but it is not using the order by RAND? It seems that things are slowed down completely.

Thank you!

I am not sure that there is a simple solution to change your query, There is an article to fix.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -