mysql - What's faster/more efficient: Continuous Deleting OR Continuous Updating + Intermittent Deleting? -


I have a cron that runs through several rows, removal of "bad" people (as per my criteria) . I'm wondering what would be best to optimize the script. I can do one of the following:

  1. Remove the "bad" rows immediately after finding the same cron.

  2. Update the same cron immediately as the "bad" rows as "1", which means bad. Again, I can set another chronometer which runs and eliminates all the rows with an "1" status for an hour. To make it fast, I think I have an index on "status", but it can also ruin the display.

Any suggestions?

I have not experienced in my SSQL but on other DBMS I have worked on an update and then Removes no help Just try and remove with huge amounts of data, measure the time when the update + is removed, it helps if there is an index of the columns that act as the criteria of "bad" people.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -