Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12403

REGEXP: performance can be very very poor

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 10.1.22
    • N/A
    • Server
    • None
    • centos 7, CPU E5-1630 v3 @ 3.70GHz, 64 GB RAM, RAID1 SSD

    Description

      Horrible performances when using REGEXP

       
      SELECT count(*) FROM `jbm_clients`.`michelin`;
      +----------+
      | count(*) |
      +----------+
      |    13042 |
      +----------+
      1 row in set (0.01 sec)
       
      MariaDB [jbm]> SELECT distinct `ip` FROM `jbm_clients`.`michelin` WHERE `return_path` like '%amazonses%' and `return_path` REGEXP '(?:\.|@|-)*.amazonses.com(\.[a-z]+)?$' ;
      +-------------+
      | ip          |
      +-------------+
      | 54.240.4.10 |
      | 54.240.4.11 |
      | 54.240.4.12 |
      | 54.240.4.7  |
      | 54.240.4.8  |
      | 54.240.4.9  |
      +-------------+
      6 rows in set (0.03 sec)
       
      MariaDB [jbm]> SELECT distinct `ip` FROM `jbm_clients`.`michelin` WHERE `return_path` REGEXP '(?:\.|@|-)*.amazonses.com(\.[a-z]+)?$' ;
      +-------------+
      | ip          |
      +-------------+
      | 54.240.4.10 |
      | 54.240.4.11 |
      | 54.240.4.12 |
      | 54.240.4.7  |
      | 54.240.4.8  |
      | 54.240.4.9  |
      +-------------+
      6 rows in set (3 min 11.02 sec)
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              Pascal Pascal HOARAU
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.