在MySQL中,“开销"是什么?是什么意思,这有什么坏处,以及如何解决? [英] In MySQL what does "Overhead" mean, what is bad about it, and how to fix it?

查看:226
本文介绍了在MySQL中,“开销"是什么?是什么意思,这有什么坏处,以及如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个简单的问题,但它让我困扰了一段时间....

simple question, but its been nagging me for a while now....

在MySQL中什么是开销",我应该担心吗?

what is "overhead" in MySQL, and should i be worried?

单击优化表"是否可以将其修复?

does clicking "optimize table" fix it for real?

推荐答案

看来,开销是数据库用来运行某些查询的临时磁盘空间,因此您只需要担心它真的很高.

It appears that the overhead is temporary diskspace that the database used to run some of the queries, so you should only worry if this gets really high.

您可以将优化表"与硬盘驱动器的碎片整理进行比较.

You can compare 'Optimizing the table' with the defragmenting of your hard drive.

我引用:

随着时间的推移,每个数据库都会 需要某种形式的维护 保持最佳性能 等级.清除已删除的行, 重新排序,压缩,管理 索引路径,碎片整理等是 在MySQL中所谓的优化 和其他数据库中的其他术语. 例如,IBM DB2/400称它为 重新组织物理文件成员.

Every database will, over time, require some form of maintenance to keep it at an optimal performance level. Purging deleted rows, resequencing, compressing, managing index paths, defragmenting, etc. is what is known as OPTIMIZATION in mysql and other terms in other databases. For example, IBM DB2/400 calls it REORGANIZE PHYSICAL FILE MEMBER.

有点像在换油 您的汽车或进行调校.您可以 认为您真的不需要,但是 这样一来,您的汽车就会行驶得更好, 您可以获得更好的油耗等.汽车 需要很多里程 更频繁地进行调整.一个数据库 大量使用需要相同.如果 您正在执行很多更新和/或 删除操作,尤其是在 您的桌子长度可变 您需要的列(VARCHAR,TEXT等) 保持调优.

It's kind of like changing the oil in your car or getting a tune-up. You may think you really don't have to, but by doing so your car runs much better, you get better gas mileage, etc. A car that gets lots of mileage requires tune-ups more often. A database that gets heavy use requires the same. If you are doing a lot of UPDATE and/or DELETE operations, and especially if your tables have variable length columns (VARCHAR, TEXT, etc), you need to keep 'er tuned up.

这篇关于在MySQL中,“开销"是什么?是什么意思,这有什么坏处,以及如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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