Databases Reference
In-Depth Information
Figure 5-9. Clustered and nonclustered tables side-by-side
Table 5-1. Benchmark results for inserting rows into InnoDB tables
Table
Rows
Time (sec)
Index size (MB)
userinfo
1,000,000
137
342
userinfo_uuid
1,000,000
180
544
userinfo
3,000,000
1233
1036
userinfo_uuid
3,000,000
4525
1707
Notice that not only does it take longer to insert the rows with the UUID primary key,
but the resulting indexes are quite a bit bigger. Some of that is due to the larger primary
key, but some of it is undoubtedly due to page splits and resultant fragmentation as well.
To see why this is so, let's see what happened in the index when we inserted data into
the first table. Figure 5-10 shows inserts filling a page and then continuing on a second
page.
 
Search WWH ::




Custom Search