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

Query with ST_BUFFER is very slow comparing to MySQL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5, 10.0, 10.1, 10.2
    • Fix Version/s: 10.2
    • Component/s: GIS
    • Labels:
      None

      Description

      The query below is almost instant on MySQL 5.6/5.7, but takes ~15 seconds on any of current MariaDB releases.

      SELECT ST_BUFFER(
          ST_UNION(
              MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 3 4 , 2 5 , 7 6 , 1 8 ) , ( 0 0 , 1 6 , 0 1 , 8 9 , 2 4 , 6 1 , 3 5 , 4 8 ) , ( 9 3 , 5 4 , 1 8 , 4 2 , 5 8 , 3 0 ) )' ) ,
              MULTILINESTRINGFROMTEXT( ' MULTILINESTRING( ( 3 4 , 3 1 , 2 7 , 4 2 , 6 2 , 1 5 ) ) ' )
          ), 
          AREA(
              MULTIPOLYGONFROMTEXT( ' MULTIPOLYGON( ( ( 7 7 , 6 7, 1 5, 7 6 , 7 7 ) ) , ( (0 5, 3 5, 3 4, 1 4 , 1 3 , 3 3 , 3 0 , 0 0 , 0 5), ( 1 1 , 2 1 , 2 2 , 1 2 , 1 1 ) ) ) ' )
          )
      );
      

      Results are also different, though.

        Attachments

          Activity

            People

            Assignee:
            holyfoot Alexey Botchkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: