理解range-predicate&pivoted partitioning in Database

  • Overview

    From [1], Predication estimation is used increasingly in the Rdb optimizer to determine the cost and productivity of various index scans.

    When a particular query is executed, the conditions in the row selection expression, the “where” clause of a SQL statement, determine which rows will be selected.

    These conditions, or predicates, can be used to limit the parts of an index that are scanned to find data rows.

  • predicate

    A predicate is a condition expression that evaluates to a boolean value, either true or false.

    Predicates can be used as follows:

    • In a SELECT statement’s WHERE clause or HAVING clause to determine which rows are relevant to a particular query.
    • In a JOIN operation’s ON clause to determine which rows are relevant to the join operation
    • In an UPDATE or DELETE statement’s WHERE clause, to detemine which rows are to be modified
    • In a WHERE CURRENT OF statement’s AND clause
    • In a CREATE TRIGGER statement’s WHEN clause to determine when to apply triggered action code
  • Actian: Predicates in SQL

    Predicates are keywords that specify a relationship between two expression.

  • Partition

    A partition is a division of a logical database or its constituent elements into distinct independent parts.

    It is popular in disributed database management systems, where each partition may be spread over multiple nodes, with users at the node performing local transactions on the partition.

    Current high-end RDMS provides for different criteria to split the database. They take a partitioning key and assign a partition based on certain criteria:

    • Range partitioning

      selects a partition by determining if the partitioning key is within a certain range

    • List partitioning

      a partition is assigned a list of values, if the partitioning key has one of these values, the partition is chosen

    • Composite partitioning

      allows for certain combinations of the above partitioning schemes

    • Round-robin partitioning

      the simplest strategy, it ensures uniform data distribution

    • Hash partitioning

      applies a hash function to some attribute that yields the partition number

  • Pivot table

    A pivot table is a table of statistics that summarizes the data of a more extensive table.

    This summary might include sums, averages, or other statistics, which the pivot table groups together in a meaningful way.

    Pivoting data is a rather common problem that comes in many different flavors. At its heart, the requirement is to transpose data from multiple rows into columns of a single row.

  • References

  1. Guide to Database Performance and Tuning: Predicate Estimation A feature of Oracle Rdb

  2. InterSystems: Overview of Predicates

  3. Microsoft SQL Docs: Predicates

  4. Actian: Predicates in SQL

  5. Pivot - Rows to Columns

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值