[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 10:55:22 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:2 pento]:
> I like this index. I'd also expect it to speed up large import
processes, which make liberal use of `comment_exists()`.
>
> attachment:21435.diff updates the patch to apply cleanly against trunk,
and fixes a couple of typos in the original.
Thank you for your feedback but It's not a typo.
The parameter '2' in wcomment_author is what I expected to avoid deep
index for string.
KEY comment_author (wcomment_author(2)),
Please refer the following MySQL index logic.
https://dev.mysql.com/doc/refman/5.6/en/create-index.html
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21435#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list