Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-25519] Add partition pruning information to SQL Trace #1850

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

youngjinj
Copy link
Contributor

http://jira.cubrid.org/browse/CBRD-25519

Changes to the answers as follows:

  1. Trace information for pruned partitions is output.

For example:

select /*+ recompile */
  count (*)
from
  ta_range a
where
  a.ca between 1 and 4;

-- AS-IS
    Trace Statistics:
      SELECT (time: 0, fetch: 11, fetch_time: 0, ioread: 0)
        SCAN (index: dba.ta_range.pk_ta_range_ca_cd), (btree time: 0, fetch: 5, ioread: 0, readkeys: 400, filteredkeys: 0, rows: 0, covered: true, count_only: true)

-- TO-BE
    Trace Statistics:
      SELECT (time: 0, fetch: 11, fetch_time: 0, ioread: 0)
        SCAN (index: dba.ta_range.pk_ta_range_ca_cd), (btree time: 0, fetch: 5, ioread: 0, readkeys: 400, filteredkeys: 0, rows: 0, covered: true, count_only: true)
(+)            PARTITION (index: dba.ta_range__p__p1.pk_ta_range_ca_cd), (btree time: 0, fetch: 1, ioread: 0, readkeys: 100, filteredkeys: 0, rows: 0, covered: true, count_only: true)
(+)            PARTITION (index: dba.ta_range__p__p2.pk_ta_range_ca_cd), (btree time: 0, fetch: 1, ioread: 0, readkeys: 100, filteredkeys: 0, rows: 0, covered: true, count_only: true)
(+)            PARTITION (index: dba.ta_range__p__p3.pk_ta_range_ca_cd), (btree time: 0, fetch: 1, ioread: 0, readkeys: 100, filteredkeys: 0, rows: 0, covered: true, count_only: true)
(+)            PARTITION (index: dba.ta_range__p__p4.pk_ta_range_ca_cd), (btree time: 0, fetch: 1, ioread: 0, readkeys: 100, filteredkeys: 0, rows: 0, covered: true, count_only: true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants