PostgreSQL查询代价估算(七)

来源:互联网 发布:有线电视有网络吗 编辑:程序博客网 时间:2024/06/15 08:55

1.1.1       其他代价估算函数

函数名

功能

cost_bitmap_heap_scan

计算一个关系上采用用bitmap类型扫描的花费(使用索引计算获取的页面树)

cost_bitmap_tree_node

计算一个bitmap树节点上计算其花费和选择率(这样的节点包括i IndexPathBitmapAndPathBitmapOrPath三类)

cost_bitmap_and_node

计算BitmapAnd 类型节点的花费

cost_bitmap_or_node

计算BitmapOr 类型节点的花费

cost_subqueryscan

计算扫描子查询的花费

cost_functionscan

计算函数扫描的花费

cost_valuesscan

计算VALUES扫描的花费

cost_ctescan

计算CTE扫描的花费

cost_recursive_union

计算UNION操作的花费(PostgreSQL认为递归处理需要花费资源,为基本花费放大10倍以应对这样的情况)[1]

cost_sort

计算一个关系上排序操作的花费

cost_merge_append

计算MergeAppend类型节点的花费

cost_material

计算一个关系上物化操作的花费

cost_agg

计算带有聚集函数的节点的操作花费

cost_windowagg

计算WindowAgg类型节点的操作花费

cost_group

计算带有分组的节点的操作花费

cost_subplan

计算一个子计划的花费

cost_qual_eval

计算WHERE条件的CPU花费

cost_qual_eval_node

计算RestrictInfo 或表达式的CPU花费



[1] PostgreSQL说:We arbitrarily assume that about 10 recursive iterations will beneeded, and that we've managed to get a good fix on the cost and output size ofeach one of the

0 0