i-recommend-this icon indicating copy to clipboard operation
i-recommend-this copied to clipboard

Add MySQL index

Open hchouhan opened this issue 3 years ago • 1 comments

Create an index (sortation) based on a field or combination of fields, this grows the DB in size but allows MySQL to SELECT a lot faster as it doesn't have to loop over the whole list now. It can then jump to the requested record much much faster as it now has an index (sorted list) for those fields.

hchouhan avatar Dec 30 '21 08:12 hchouhan

ALTER TABLE (prefix) .wp_irecommendthis_votesADD UNIQUEpost_ip (post_id, ip);

that (executed after table creation and during the next update) would add an index where the post_id & ip combination is required to be a unique combo

hchouhan avatar Dec 30 '21 08:12 hchouhan

Fixed in version 3.10.3

hchouhan avatar Feb 27 '25 11:02 hchouhan