Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prioritise certain queries in MySQL?

I have a large number of background reads and writes, and a much smaller number of user reads, of a highly contended MySQL database - is there any way to flag certain queries (the user queries) as being high priority so that they take preference over background queries? I want user responsiveness to be high, but don't really care about the background queries.

Thanks

like image 726
MalcomTucker Avatar asked Mar 09 '10 10:03

MalcomTucker


1 Answers

MySQl supports insert delayed for delayed inserts and low_priority for updates. And for your user reads, there's the high_priority extension on select. If you're using the MyISAM storage engine, there's the related (but different) concurrent inserts feature.

like image 102
T.J. Crowder Avatar answered Oct 08 '22 01:10

T.J. Crowder