時間:2024-02-09 10:40作者:下載吧人氣:15
摘要
關系數據庫很重要的一個方面是查詢速度。查詢速度的好壞,直接影響一個系統的好壞。
查詢速度一般需要通過查詢規劃來窺視執行的過程。
查詢路徑會選擇查詢代價最低的路徑執行。而這個代價是怎么算出來的呢。
主要關注的參數和表
參數:來自postgresql.conf文件,可以通過show 來查看
seq_page_cost = 1.0 # measured on an arbitrary scale
random_page_cost = 4.0 # same scale as above
cpu_tuple_cost = 0.01 # same scale as above
cpu_index_tuple_cost = 0.005 # same scale as above
cpu_operator_cost = 0.0025 # same scale as above
parallel_tuple_cost = 0.1 # same scale as above
parallel_setup_cost = 1000.0 # same scale as above
網友評論