TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to monitor MySQL / MariaDB query progress

98 点作者 DSpinellis超过 5 年前

6 条评论

morgo超过 5 年前
For MySQL there are better ways to do this: <a href="https:&#x2F;&#x2F;mysql.wisborg.dk&#x2F;2018&#x2F;08&#x2F;10&#x2F;innodb-progress-information&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mysql.wisborg.dk&#x2F;2018&#x2F;08&#x2F;10&#x2F;innodb-progress-informat...</a><p>The article is MariaDB specific.
评论 #21651816 未加载
评论 #21651882 未加载
wolf550e超过 5 年前
The shell script uses lsof to read file offsets of files. This is neat. But it won&#x27;t work for database tables in tablespaces (i.e. when not using file per table).
jamesbiv超过 5 年前
I’m not too sure if it covers table changes but MySQL comes with a slow log tool which tells you what queries are causing performance issues and if need be help optimize query requests itself, indexing even though is painstaking is perhaps the best way to fix the issue in the long run but to track down the slow queries in the first place and mitigate against them individually I’d use slow log.<p><a href="https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;5.7&#x2F;en&#x2F;slow-query-log.html" rel="nofollow">https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;5.7&#x2F;en&#x2F;slow-query-log.html</a>
durpleDrank超过 5 年前
Prometheus is a good option as well. <a href="https:&#x2F;&#x2F;github.com&#x2F;prometheus&#x2F;mysqld_exporter" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;prometheus&#x2F;mysqld_exporter</a>
ping_pong超过 5 年前
Sorry but adding a new index on a table with 6 billion rows is stupid. If you did this in production, it would take that table offline for possibly days. And if it somehow failed, you would be SOL.<p>You create a copy of the table with an updated set of indexes and copy the data over into the new table. I think Percona even has a utility that will copy all the next data over via stored procedure that is getting written to the table.
评论 #21653968 未加载
评论 #21653166 未加载
评论 #21653204 未加载
评论 #21653387 未加载
评论 #21652858 未加载
crazygringo超过 5 年前
I would love to see this built-in as a column to SHOW PROCESSLIST, that would show % done.