[wp-trac] [WordPress Trac] #15004: Missing index on signups table
WordPress Trac
noreply at wordpress.org
Tue Aug 27 20:27:42 UTC 2013
#15004: Missing index on signups table
-------------------------------------------------+-------------------------
Reporter: barry | Owner: pento
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future
Component: Database | Release
Severity: normal | Version:
Keywords: has-patch commit needs-refresh | Resolution:
3.6-early |
-------------------------------------------------+-------------------------
Comment (by josephscott):
@nacin asked about the impact of adding a signup_id column on a wp_signups
table that already had 100,000 rows in it. I put together a simple test
script to build a signups table, fill it with 100,000 records, add the
signup_id column as a primary key, drop the domain key, and add the other
suggested keys. The script is attached to this ticket -
http://core.trac.wordpress.org/attachment/ticket/15004/wp-signups.php
On my Macbook Air the impact of the key changes was fairly small:
{{{
time php wp-signups.php
- Creating j5test_signups table ... 0.02 seconds
- Adding 100,000 rows to j5test_signups ... 43.73 seconds
- Adding signup_id column ( PK ) to j5test_signups ... 1.67 seconds
- Dropping key on domain column ... 0.04 seconds
- Adding key on domain,path ... 0.41 seconds
- Adding key on user_login,user_email ... 0.49 seconds
- Adding key on user_email ... 0.37 seconds
- Dropping j5test_signups ... 0.04 seconds
real 0m46.996s
user 0m16.814s
sys 0m1.434s
}}}
Adding the signup_id column and all of the other key changes took roughly
3 seconds.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15004#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list