Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3690

SELECT only validates extent for the first column from the select list

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 1.4.2
    • Icebox
    • N/A
    • None

    Description

      Note: Possibly it's a documentation shortage (obscurity) only.

      According to the KB, COLUMNSTORE_EXTENTS.STATE is Invalid if the table has not been accessed. If "table" here is the MariaDB table, it is not quite accurate. The state remains Invalid even if the table is accessed for all columns from the select list except for the first one.

      MariaDB f93bfb9288d020b190f5c73a31223fff6439687d

      MariaDB [db]> create table t1 (a int, b int, c int) engine=Columnstore;
      Query OK, 0 rows affected (0.565 sec)
       
      MariaDB [db]> insert into t1 values (1,1,1);
      Query OK, 1 row affected (0.223 sec)
       
      MariaDB [db]> select * from information_schema.columnstore_extents;
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      | OBJECT_ID | OBJECT_TYPE | LOGICAL_BLOCK_START | LOGICAL_BLOCK_END | MIN_VALUE | MAX_VALUE | WIDTH | DBROOT | PARTITION_ID | SEGMENT_ID | BLOCK_OFFSET | MAX_BLOCKS | HIGH_WATER_MARK | STATE   | STATUS    | DATA_SIZE |
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      |      3175 | Column      |              234496 |            238591 |      NULL |      NULL |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Invalid | Available |         0 |
      |      3176 | Column      |              238592 |            242687 |      NULL |      NULL |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Invalid | Available |         0 |
      |      3177 | Column      |              242688 |            246783 |      NULL |      NULL |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Invalid | Available |         0 |
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      3 rows in set (0.040 sec)
       
      MariaDB [db]> select a, b, c from t1;
      +------+------+------+
      | a    | b    | c    |
      +------+------+------+
      |    1 |    1 |    1 |
      +------+------+------+
      1 row in set (0.079 sec)
       
      MariaDB [db]> select * from information_schema.columnstore_extents;
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      | OBJECT_ID | OBJECT_TYPE | LOGICAL_BLOCK_START | LOGICAL_BLOCK_END | MIN_VALUE | MAX_VALUE | WIDTH | DBROOT | PARTITION_ID | SEGMENT_ID | BLOCK_OFFSET | MAX_BLOCKS | HIGH_WATER_MARK | STATE   | STATUS    | DATA_SIZE |
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      |      3175 | Column      |              234496 |            238591 |         1 |         1 |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Valid   | Available |         0 |
      |      3176 | Column      |              238592 |            242687 |      NULL |      NULL |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Invalid | Available |         0 |
      |      3177 | Column      |              242688 |            246783 |      NULL |      NULL |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Invalid | Available |         0 |
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      3 rows in set (0.037 sec)
       
      MariaDB [db]> select c, b, a from t1;
      +------+------+------+
      | c    | b    | a    |
      +------+------+------+
      |    1 |    1 |    1 |
      +------+------+------+
      1 row in set (0.024 sec)
       
      MariaDB [db]> select * from information_schema.columnstore_extents;
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      | OBJECT_ID | OBJECT_TYPE | LOGICAL_BLOCK_START | LOGICAL_BLOCK_END | MIN_VALUE | MAX_VALUE | WIDTH | DBROOT | PARTITION_ID | SEGMENT_ID | BLOCK_OFFSET | MAX_BLOCKS | HIGH_WATER_MARK | STATE   | STATUS    | DATA_SIZE |
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      |      3175 | Column      |              234496 |            238591 |         1 |         1 |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Valid   | Available |         0 |
      |      3176 | Column      |              238592 |            242687 |      NULL |      NULL |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Invalid | Available |         0 |
      |      3177 | Column      |              242688 |            246783 |         1 |         1 |     4 |      1 |            0 |          0 |            0 |       4096 |               0 | Valid   | Available |         0 |
      +-----------+-------------+---------------------+-------------------+-----------+-----------+-------+--------+--------------+------------+--------------+------------+-----------------+---------+-----------+-----------+
      3 rows in set (0.039 sec)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            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.