• mysql> explain  select * from wp_WP_SEO_Redirection where enabled=1 and cat='link' and blog='1' and regex<>'' and ('/tag/contestata/' regexp regex or '/tag/contestata'  regexp regex ) order by LENGTH(regex) desc;
    +----+-------------+-----------------------+------+---------------+------+---------+------+-------+-----------------------------+
    | id | select_type | table                 | type | possible_keys | key  | key_len | ref  | rows  | Extra                       |
    +----+-------------+-----------------------+------+---------------+------+---------+------+-------+-----------------------------+
    |  1 | SIMPLE      | wp_WP_SEO_Redirection | ALL  | NULL          | NULL | NULL    | NULL | 58295 | Using where; Using filesort |
    +----+-------------+-----------------------+------+---------------+------+---------+------+-------+-----------------------------+
    1 row in set (0.01 sec)

    Using filesort is killer and I find this kind of queries a lot under mysql’s process list.

    Would be of help to exclude regexp? I dont need that.

    • This topic was modified 6 years, 5 months ago by DrLightman.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter DrLightman

    (@drlightman)

    Is this plugin dead?

    hello,
    thank you for using our plugin,
    we are sorry for any delay,

    Regarding the regex condition, we can’t remove it because from this query!
    the results will be different if we change it, so please keep it without changes,

    please contact us again if you still need any help,
    here is our support center:
    http://www.clogica.com/contact-us

    Thread Starter DrLightman

    (@drlightman)

    Yeah I’m using the pro version too.

    Don’t you think that this kind of query don’t scale good on medium-large sites? Having to run at every request and doing some regexp check on a non-indexed query is dangerous.

    we will take care of this in our next release,
    thank you for notifying us

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can you do something to optimize this kind of query?’ is closed to new replies.