Bug #1981 Unneccessary use of filesort and temporary table when using GROUP BY
| Submitted: | 28 Nov 2003 14:42 | Modified: | 11 Dec 2003 10:31 |
|---|---|---|---|
| Reporter: | James Harvard | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: MyISAM storage engine | Severity: | S3 (Non-critical) |
| Version: | 4.0.16 | OS: | MacOS (Mac OS X) |
| Assigned to: | CPU Architecture: | Any |
[28 Nov 2003 14:42]
James Harvard
[28 Nov 2003 14:53]
James Harvard
I've uploaded a file with table structure & sample data for running the 'explain select ...' statements provided under 'how to repeat'.
[11 Dec 2003 10:31]
MySQL Verification Team
If there is no index on l.sale, then temporary table has to be used. Filesort can be avoided by adding ORDER BY NULL, in which case results will be unsorted. Also, EXPLAIN at this point does not know number of rows to be returned, so filesort is actually never done.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.