简体   繁体   English

相同的mysql查询在phpmyadmin中的不同时间给出不同的结果

[英]Same mysql query gives different results at different times in phpmyadmin

We're running the following very simple mysql query through phpmyadmin 我们正在通过phpmyadmin运行以下非常简单的mysql查询

SELECT * FROM ProcessedListAssociations

We know the correct result has 751331 rows but successive runs of the query return different row counts - anywhere from 749978 to 752165 rows. 我们知道正确的结果有751331行,但是连续的查询返回不同的行数-从749978到752165行不等。 At least that's what the row count message at the top of the phpmyadmin result page says: Showing rows 0 - 24 (752165 total, Query took 0.0005 seconds.) 至少那是phpmyadmin结果页面顶部的行计数消息所显示的内容:显示0至24行(总计752165行,查询花费了0.0005秒。)

Running the query from a php script seems to return a result with the correct number of rows. 从php脚本运行查询似乎返回具有正确行数的结果。

Running the following query from phpmyadmin: 从phpmyadmin运行以下查询:

SELECT count(*) FROM ProcessedListAssociations

also returns the correct result (751331) 还返回正确的结果(751331)

We have recreated the table from scratch & still observe the same issue. 我们从头开始重新创建了表格,并且仍然观察到相同的问题。

The table is an innoDB table. 该表是一个innoDB表。 Here's basic info as phpmyAdmin reports it: Space usage Data 68.6 MiB Index 136.3 MiB Total 204.9 MiB Row statistics Format Compact Collation utf8_general_ci Next autoindex 751,332 这是phpmyAdmin报告的基本信息:空间使用情况数据68.6 MiB索引136.3 MiB总计204.9 MiB行统计信息格式紧凑排序规则utf8_general_ci下一个自动索引751,332

Could it have something to do with concurrency? 可能与并发有关吗? The server has 4 E7-4870 processors (80 threads total) but in the php.ini thread Safety is disabled. 该服务器具有4个E7-4870处理器(总共80个线程),但是在php.ini线程中,安全性已禁用。 If that is indeed the problem, then why are we only observing it in phpmyadmin and not with our own php scripts too? 如果确实是问题所在,那为什么我们只在phpmyadmin中观察它,而不用我们自己的php脚本观察呢?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM