wordpress里面的慢SQL,把wp_postmeta.meta_key的类型由varchar(255)改变为varchar(191)

SELECT DISTINCT meta_key
			FROM wp_postmeta
			WHERE meta_key NOT BETWEEN '_' AND '_z'
			HAVING meta_key NOT LIKE '\\_%'
			ORDER BY meta_key
			LIMIT 30;

当wordpress里面的慢SQL,把wp_postmeta.meta_key的类型由varchar(255)改变为varchar(191)
目前我的mysql版本是5.5
不知道新版本有没有改进,看了别人描述(https://core.trac.wordpress.org/ticket/33885#comment:5),说是只取前191个字节做索引。

Related posts:

Leave a Reply

Your email address will not be published.