| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Jay Blanchard | Date: | May 9 2002 4:01pm |
| Subject: | MySQL GROUP BY Anomaly? | ||
| View as plain text | |||
I have 2 tables with RecordDate in them, one has millions of records, one
has hundreds of records. If I perform the following query on the table with
hundreds;
mysql> select RecordDate
-> from tblInfo
-> WHERE RecordDate BETWEEN '2002-03-04' AND '2002-03-06'
-> GROUP BY RecordDate;
I get three rows back in the result;
+------------+
| RecordDate |
+------------+
| 2002-03-04 |
| 2002-03-05 |
| 2002-03-06 |
+------------+
but if I run this query against the table with millions of records I get (a
small snippet of the results)
| 2002-03-06 |
| 2002-03-05 |
| 2002-03-06 |
| 2002-03-05 |
| 2002-03-06 |
| 2002-03-05 |
| 2002-03-06 |
| 2002-03-05 |
| 2002-03-04 |
+------------+
34164 rows in set (17.78 sec)
Can anyone enlighten me as to what is happening? Both tables are on the same
machine, but the one with millions of records is a MERGE table. If I run the
query against the individual tables in the merge, they return the proper (3
row) result.
Thanks!
Jay
| Thread | ||
|---|---|---|
| • Multiple tables in delete statement on Mysql 3 | Augey Mikus | 9 May |
| • RE: Multiple tables in delete statement on Mysql 3 | Jay Blanchard | 9 May |
| • Re: Multiple tables in delete statement on Mysql 3 | Augey Mikus | 9 May |
| • RE: Multiple tables in delete statement on Mysql 3 | Jay Blanchard | 9 May |
| • Re: Multiple tables in delete statement on Mysql 3 | Gelu Gogancea | 9 May |
| • Re: Multiple tables in delete statement on Mysql 3 | Augey Mikus | 9 May |
| • Re: Multiple tables in delete statement on Mysql 3 | Egor Egorov | 9 May |
| • Re: Multiple tables in delete statement on Mysql 3 | Paul DuBois | 9 May |
| • Re: Multiple tables in delete statement on Mysql 3 | Augey Mikus | 9 May |
| • Re: Multiple tables in delete statement on Mysql 3 | Paul DuBois | 9 May |
| • MySQL GROUP BY Anomaly? | Jay Blanchard | 9 May |
| • RE: MySQL GROUP BY Anomaly? | Max Anderson | 9 May |
| • RE: MySQL GROUP BY Anomaly? | Jay Blanchard | 9 May |
| • RE: MySQL GROUP BY Anomaly? SOLVED | Jay Blanchard | 9 May |
| • RE: MySQL GROUP BY Anomaly? | Max Anderson | 9 May |
