Re: Question about Expected rows value in EXPLAIN output for Nested Loop node

2019-05-11 Thread Tom Lane
bb ddd 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/

Re: Question about Expected rows value in EXPLAIN output for Nested Loop node

2019-05-11 Thread Adrian Klaver
On 5/11/19 2:33 AM, bb ddd wrote: Thanks, Adrian, but i was looking for something that goes into more depth. For example there is one case described there where we have a Nested Loop with rows=33, and its 2 child nodes have each rows=10. But first of all this is a very exotic join condition (t1

Re: Question about Expected rows value in EXPLAIN output for Nested Loop node

2019-05-11 Thread bb ddd
am just guessing. > Оригинално писмо >От: Adrian Klaver adrian.kla...@aklaver.com >Относно: Re: Question about Expected rows value in EXPLAIN output for Nested Loop node >До: bb ddd >Изпратено на: 10.05.2019 19:02 > On 5/10/19 8:56 AM, bb ddd wrote: > >

Re: Question about Expected rows value in EXPLAIN output for Nested Loop node

2019-05-10 Thread Adrian Klaver
On 5/10/19 8:56 AM, bb ddd wrote: Thanks for the reply. Here it is: https://explain.depesz.com/s/LQCS My main trouble is not with this exact case, but i am looking for a general description of the algorithm how those numbers are calculated. In the meanwhile i also constructed a couple of artif

Re: Question about Expected rows value in EXPLAIN output for Nested Loop node

2019-05-10 Thread bb ddd
contexts (like when loops=1 vs loops>1) maybe what statistics they use, how they depend on the numbers of their child nodes etc. > Оригинално писмо >От: Adrian Klaver adrian.kla...@aklaver.com >Относно: Re: Question about Expected rows value in EXPLAIN outpu

Re: Question about Expected rows value in EXPLAIN output for Nested Loop node

2019-05-10 Thread Adrian Klaver
On 5/10/19 5:32 AM, bb ddd wrote: Not sure why some of the new lines disappeared in the original message. here is the part that got most corrupted with some more new lines lets hope it looks more readable now 1) I have 2 Index Scans inside a Nested Loop 2) Nested Loop's expected rows=1268

Re: Question about Expected rows value in EXPLAIN output for Nested Loop node

2019-05-10 Thread bb ddd
s expected rows=7 3.2) Second Index Scan's expected rows=43810 > Оригинално писмо >От: bb ddd nnickoloff1...@abv.bg >Относно: Question about Expected rows value in EXPLAIN output for Nested Loop >node >До: pgsql-gene...@postgresql.org &

Question about Expected rows value in EXPLAIN output for Nested Loop node

2019-05-10 Thread bb ddd
Hello, I have the following question. Looking at the output of EXPLAIN ANALYZE: 1) I have 2 Index Scans inside a Nested Loop2) Nested Loop's expected rows=12683.1) First Index Scan's expected rows=73.2) Second Index Scan's expected rows=43810 I was living under the impression that a Nested Loop'