[thelist] MySQL GROUP BY Anomaly? SOLVED

Jay Blanchard jay.blanchard at niicommunications.com
Thu May 9 13:28:00 CDT 2002


[snip]
The date is the only thing entered here, so all of the times are
00:00:00:00. Also, if the time was a factor it would blow up when I select
the entire range of dates in the database, but that works. I only get the
problem when I select a narrower range of dates than the entire databse, or
when I select one date.Heck, when I SELECT DISTINCT RecordDate from the
table, that gives me back the dates more than once too. I have a feeling it
has something to do with it being a merged table...but what?
[/snip]

Had a look at the table description (DESCRIBE tablename;) for the merge
table. There was an INDEX set on the RecordDate column. Since the RecordDate
columns in each of the tables comprising the merge already have INDEXes set
on them, there is no need for the INDEX to exist in the MERGE definition.
Removed the INDEX from the MERGE table definition and all appears to be
working well.

!

Jay





More information about the thelist mailing list