phpMyAdmin 显示数据库表的负总记录
当我检查数据库时,它显示一个表的负记录(例如-200,000),其他表的记录是静态的。
当我查看表格并返回摘要时,它随机更改为 -198,000 或 -220,000...它不是静态的。
可能会发生什么?
When I check my database, it's showing negative records for a table (e.g. -200,000), other tables' records are static.
When I view the table and go back to the summary, it changes randomly to -198,000, or -220,000... It's just not static.
What could be happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这是一个老问题,但我遇到了一个问题,这篇文章是谷歌上出现的第一件事,所以我想我会提出正确的答案。
您会注意到所有“负 mysql 记录”问题都与大型表或数据库有关。这不是一个负号,它的~,意思是大约。基本上就是说有那么多记录。据我所知,一旦 phpMyAdmin 中任何表的记录超过 20,000 条,它就会显示出来。这也是提问者数量不断波动的原因,这并不准确。
This is an old question but one that I ran into and this post was the first thing to show up on google so I thought I would put the right answer up.
You'll notice that all of the "negative mysql records" questions are with large tables or databases. This isn't a negative sign its ~, which means approximately. It's basically saying that there's around that many records. As far as I can tell, it shows up once any table gets more than 20,000 records in it in phpMyAdmin. This is also why the askers numbers keep fluctuating, it's not exact.
正如 Eric Strom 已经提到的那样,这是正确的,即 phpMyAdmin 的符号平均估计总行数。您始终可以删除该 ~ 符号或通过单击此数字获取其总行的精确值。这是我的
自己的表示例:
,点击以~号开头的数字后,您将得到重新计算后的总行数。
as Eric Strom already mention that, it is correct which is that sign mean estimated total row by phpMyAdmin. you can always get a rid of that ~ sign or get exact value of its total row by clicking this number. here it is on my
own table example :
and after click that number that started with ~ sign, you will get total row exactly after being re-calculated.
转到 phpmyadmin
每个操作旁边都有一个帮助按钮来解释它的作用。 (我打赌 FLUSH 应该可以解决你的问题)。
go to phpmyadmin
Each operation has a help button next to it to explain what it does. (My bet is that FLUSH should fix your problem).
如果 FLUSH 没有解决您的问题,请尝试对表进行碎片整理。当表包含数十亿行时,通常会出现表行数的这种变化。
PHP-Myadmin 总会有一些限制。
同时,您还可以触发查询“
select count(id) from tableName
”来获取确切的行数。If FLUSH didn't solve your problem, try to de-fragment your table, This variations in numbers of table-rows usually occurs when table contains billions of rows.
There will be always some limitations in PHP-Myadmin.
And same time you can also fire a query "
select count(id) from tableName
" to get the exact number of rows.