[wp-trac] [WordPress Trac] #21435: wp-includes/comment.php line85 causes slow query due to the non-indexed column

WordPress Trac noreply at wordpress.org
Thu Feb 27 11:01:05 UTC 2014


#21435: wp-includes/comment.php line85 causes slow query due to the non-indexed
column
-------------------------+--------------------------
 Reporter:  matsubobo    |       Owner:  pento
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  3.9
Component:  Database     |     Version:  3.4.1
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |     Focuses:  performance
-------------------------+--------------------------

Comment (by matsubobo):

 Replying to [comment:6 mdawaffe]:
 > Seems like `(comment_author_email,comment_author)` would be more
 generally useful.

 I don't think so.
 The column, `comment_author` is stored almost unique and cardinality is
 high so I just added index for this column to avoid getting RDBMS's index
 size big and overhead of updating row.

 Adding multi column index to character column leads to deep BTree index.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21435#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list