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

query takes a long time

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Incomplete
    • 10.0.23
    • N/A
    • GIS
    •  10.0.23-MariaDB-1~wheezy-log - mariadb.org binary distribution

    Description

      this query takes about 10 minutes

      SELECT ac.id, ac.iso_n3, ac.iso_a2, ac.iso_a3, ac.dial_code, ac.zip_format, ac.name_long, ac.name, ac.name_un_long, ac.name_un, ac.default_lang_id, ac.default_currency_id, ac.states, ac.region_type_primary, ac.region_type_secondary, ac.continent, ac.neighbours, ac.languages, ac.tld, ac.currency_code, ac.dummy FROM `global`.`address_country` ac WHERE ac.dummy IS NULL AND ac.id IN(SELECT DISTINCT id FROM `global`.`address_country_shape` acs WHERE ST_INTERSECTS(shape,@var56d318005292f)) ORDER BY ac.name
      

      the problem is with st intersects part
      address_country_shape has about 300 rows
      in @var there some polyline, should not be more that 1000 points
      it usually works but with some polyline it took a long time
      it says Copying to tmp table and the cpu is on 100%

      Attachments

        1. address_country.sql
          51 kB
          Pavel Dvorak
        2. data.sql
          2.84 MB
          Pavel Dvorak

        Activity

          People

            Unassigned Unassigned
            dvorak Pavel Dvorak
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.