phpMyAdmin - 行列中的波浪号 (~) 是什么意思?

2023-10-11php开发问题
18

本文介绍了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 - 行列中的波浪号 (~) 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17