Re: Question about Expected rows value in EXPLAIN output for Nested Loop node
От | Tom Lane |
---|---|
Тема | Re: Question about Expected rows value in EXPLAIN output for Nested Loop node |
Дата | |
Msg-id | 32178.1557589638@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Question about Expected rows value in EXPLAIN output for Nested Loop node (bb ddd <nnickoloff1234@abv.bg>) |
Список | pgsql-general |
bb ddd <nnickoloff1234@abv.bg> writes: > Thanks, Adrian, but i was looking for something that goes into more depth. Use the source, Luke. git clone git://git.postgresql.org/git/postgresql.git Likely places to look for this purpose include src/backend/optimizer/README src/backend/optimizer/path/costsize.c src/backend/optimizer/path/clausesel.c src/backend/utils/adt/selfuncs.c The short answer to your question is that no, the size of the join relation is not estimated by multiplying the sizes of input paths for some particular nestloop plan. The join size estimate is made first and the same size is applied to all paths for the join. In the case of a nestloop where the entire join condition was pushed into the RHS path, you'd ideally expect that the LHS size times the estimated size of the filtered RHS path matches the previously-made join size estimate ... but those are different code paths using different estimators, and since this is all very approximate and full of heuristic guesses, sometimes they don't match very well. regards, tom lane
В списке pgsql-general по дате отправления: