Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
От | David Rowley |
---|---|
Тема | Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment |
Дата | |
Msg-id | CAApHDvoqHSX8OOLQy4Eu2_mz2MWMyHsoArnCy70zHuAV47ssnA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
|
Список | pgsql-hackers |
On Wed, 16 Apr 2025 at 04:25, Robert Haas <robertmhaas@gmail.com> wrote: > > On Mon, Apr 14, 2025 at 8:23 PM David Rowley <dgrowleyml@gmail.com> wrote: > > "Estimates: capacity=N distinct keys=N lookups=N hit ratio=N.N%" > > Is lookups=N here the estimated number of lookups i.e. what we think > nloops will end up being? Yes. The estimate is the "calls" variable in cost_memoize_rescan(), which is fairly critical in the hit ratio estimate calculation. Technically this is just the Nested Loop's outer_path->rows. There was an argument earlier in the thread for putting this in along with the other fields to make things easier to read. I did argue that it was redundant due to the fact that the reader can look at the row estimate for the outer side of the Nest Loop, but maybe it's small enough to go in using the above format. David
В списке pgsql-hackers по дате отправления: