如何在MySQL中确定某些查询的优先级? [英] How to prioritise certain queries in MySQL?
问题描述
我对高度竞争的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.
谢谢
推荐答案
MySQl支持 insert delayed
用于延迟的insert
和 low_priority
for update
s.对于您的用户来说,在 select
上有high_priority
扩展名.如果您使用的是MyISAM存储引擎,则有相关的(但不同的)
MySQl supports insert delayed
for delayed insert
s and low_priority
for update
s. 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.
这篇关于如何在MySQL中确定某些查询的优先级?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!