Bug #53631 | Primary key index size optimisation disagrees with docs | ||
---|---|---|---|
Submitted: | 13 May 2010 20:54 | Modified: | 26 May 2010 20:59 |
Reporter: | Chris Wilson | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S3 (Non-critical) |
Version: | 5.0.41-community-log | OS: | Linux (CentOS 5.4) |
Assigned to: | CPU Architecture: | Any |
[13 May 2010 20:54]
Chris Wilson
[14 May 2010 3:24]
Valeriy Kravchuk
I do not see any dump file uploaded.
[14 May 2010 19:17]
Chris Wilson
Bug data trimmed to make it easier to work with, but still demonstrate the problem, and attached.
[14 May 2010 19:41]
Chris Wilson
Perhaps "improve space utilisation" actually means that performance is better, rather than that the file size is smaller. With a larger data set, I notice a 20% reduction in INSERT time: chris@gcc(tmp)$ time mysql -u root pmacct_temp < pmacct-short.sql real 0m26.496s user 0m2.352s sys 0m0.917s chris@gcc(tmp)$ time mysql -u root pmacct_temp < pmacct-short.sql real 0m26.463s user 0m2.283s sys 0m0.978s chris@gcc(tmp)$ vi pmacct-short.sql (move stamp_inserted from last to first in the primary key of acct_v7) chris@gcc(tmp)$ time mysql -u root pmacct_temp < pmacct-short.sql real 0m19.833s user 0m2.312s sys 0m0.861s chris@gcc(tmp)$ time mysql -u root pmacct_temp < pmacct-short.sql real 0m20.022s user 0m2.374s sys 0m0.942s
[26 May 2010 20:59]
Sveta Smirnova
Thank you for the feedback. You insert in not sorted order starting from mac_src and mac_dst fields at least. Simple query alter table acct_v7 order by `agent_id`,`class_id`,`mac_src`,`mac_dst`,`vlan`,`as_src`,`as_dst`,`ip_src`,`ip_dst`,`src_port`,`dst_port`,`ip_proto`,`tos`,`stamp_inserted`; decreases size of index file 2 times. So I am closing this as not a bug.