Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3396 Group/Order query displays wrong result with large dataset

3.4.3
invalid
nobody
5
2013-06-11
2011-08-06
Anonymous
No

I ran this query on a table with around 211,000 rows. The table is basically a mapping of X's to Y's.

SELECT xid, count(yid) AS tot FROM x_y_map WHERE z=11 GROUP BY xid ORDER BY tot DESC

Without the ORDER BY the query runs fine and returns each X with their Y count, but at the top it says "Showing rows 0 - 0 ( 1 total, Query took 0.0003 sec)".
With the ORDER BY phpmyadmin just returns one row: 0 / 36503.
Removing the z=11 bit also returns the correct results. (Incidentally, z=11 account for 36k of the 211k rows.)

If I run the query through PHP's mysql_query I get the correct results, so the query is correct and PHP/MySQL are working fine. PHPMyAdmin is either running a different query or messing up the results display.

VERSION INFO
Server: Localhost via UNIX socket
Server version: 5.1.41-3ubuntu12.10
phpMyAdmin 3.4.3.2
MySQL 5.1.41
PHP 5.3.5

Discussion

  • Marc Delisle
    Marc Delisle
    2011-12-29

    • status: open --> pending
     
  • Marc Delisle
    Marc Delisle
    2011-12-29

    Could you attach an export for a smaller example of your problem?

     
  • Marc Delisle
    Marc Delisle
    2013-01-18

    • status: pending --> closed-invalid
     
  • Michal Čihař
    Michal Čihař
    2013-06-11

    • Status: closed-invalid --> invalid