Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1648

Extra scan being issued while doing SELECT COUNT(*) queries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 4.3.0
    • None
    • None

    Description

      On turning tracing on and executing SELECT COUNT queries, I am seeing an extra scan being executed every time.

      CREATE TABLE MY_TABLE (ID INTEGER NOT NULL PRIMARY KEY, VALUE INTEGER) SALT_BUCKETS = 16

      SELECT COUNT FROM MY_TABLE

      The trace table has:

      Creating basic query for [CLIENT 16-CHUNK PARALLEL 16-WAY FULL SCAN OVER MY_TABLE, SERVER FILTER BY FIRST KEY ONLY, SERVER AGGREGATE INTO SINGLE ROW]
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Parallel scanner for table: MY_TABLE
      Creating basic query for [CLIENT 1-CHUNK PARALLEL 1-WAY RANGE SCAN OVER SYSTEM.CATALOG [null,null,'MY_TABLE',not null], SERVER FILTER BY COLUMN_FAMILY IS NULL]
      Parallel scanner for table: SYSTEM.CATALOG

      While the 16 scanners being created for MY_TABLE is expected, the extra scanner for SYSTEM.CATALOG isn't. This is happening consistently, so this likely isn't happening because of cache expiration.

      Attachments

        Activity

          People

            samarthjain Samarth Jain
            samarthjain Samarth Jain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: