PostgreSQL文檔指出,在explain
命令中,width
參數是estimated width of each row
。PostgreSQL中的寬度細節EXPLAIN命令
- 這個寬度是如何計算的(請說明PostgreSQL
.c
文件在哪裏進行這個計算)? - 它是否使用
pg_statistic
表中每列的avg_width
值?
謝謝。
PostgreSQL文檔指出,在explain
命令中,width
參數是estimated width of each row
。PostgreSQL中的寬度細節EXPLAIN命令
.c
文件在哪裏進行這個計算)?pg_statistic
表中每列的avg_width
值?謝謝。
這是你在找什麼? http://doxygen.postgresql.org/commands_2analyze_8c_source.html和 http://doxygen.postgresql.org/plannodes_8h_source.html#l00103
是的,我知道這是plan_width。我不知道它是如何計算的。我只是發現它使用pg_statistics中的'avg_width'來爲選擇列表中的每一列確定'plan_width'。 – user2761431
的[什麼是PostgreSQL的講解告訴我到底是什麼?(http://stackoverflow.com/questions/117262/what-is-postgresql-explain-telling-me-exactly) –
可能重複@ KonstantinV.Salikhov我經歷了答案。他們詳細解釋'explain',但不給我關於'width'的信息。我沒有在那找到我的答案。如果你能指出我在答案中的位置,討論'寬度'細節,這將會有所幫助。 – user2761431