如何在MySQL中确定某些查询的优先级? [英] How to prioritise certain queries in MySQL?

查看:114
本文介绍了如何在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 select上有high_priority扩展名.如果您使用的是MyISAM存储引擎,则有相关的(但不同的)

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.

这篇关于如何在MySQL中确定某些查询的优先级?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆