phpMyAdmin - 行列中的波浪号 (~) 是什么意思? [英] phpMyAdmin - What a tilde (~) means in rows column?

查看:25
本文介绍了phpMyAdmin - 行列中的波浪号 (~) 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级了 Joomla!使用大量文章数据集从 1.5 安装到 1.7 并且升级方法是升级数据库(基本上是将内容插入另一个表)我注意到 Rows 列值以波浪号(~):

I recently upgrade a Joomla! installation from 1.5 to 1.7 with a large dataset of articles and while the upgrade method was upgrading the database (inserting content to another table, basically) I noticed that the Rows column value was prefixed with a tilde (~):

现在,乍一看,我认为这意味着该值是近似值,因为当我刷新页面时,我看到了不同的值,有时更高,有时更低.好的,假设该值是近似值,在这种情况下,是什么原因造成的?一些注意事项:

Now, at first sight I assume this means that the value is approximate because when I refresh the page I see a different value, sometimes higher, sometimes lower. OK, lets say the value is approximate, in that case, what is causing that? Some considerations:

  • 操作系统:Windows 7.
  • 服务器:Apache 2,带有 PHP 5.3 和 MySQL 5.1.50-community.

推荐答案

行数是 InnoDB 用于查询优化的近似值.执行 count(*) 的效率要低得多,粗略了解行数足以优化查询计划.phpMyAdmin 将执行显示表状态"查询以获取有关表的信息:

The row count is an approximation used for query optimisation by InnoDB. doing a count(*) is a lot more inefficient and having a rough idea of the number of rows is sufficient to optimise the query plan. phpMyAdmin will be doing a "show table status" query to get the information about the table:

http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html

对于其他存储引擎,比如 InnoDB,这个值是一个近似值,可能与实际值相差 40 至50%.在这种情况下,请使用 SELECT COUNT(*) 获得准确的计数.

For other storage engines, such as InnoDB, this value is an approximation, and may vary from the actual value by as much as 40 to 50%. In such cases, use SELECT COUNT(*) to obtain an accurate count.

这篇关于phpMyAdmin - 行列中的波浪号 (~) 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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