| От | Tom Lane |
|---|---|
| Тема | Re: Startup cost of sequential scan |
| Дата | |
| Msg-id | 9842.1535643199@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Startup cost of sequential scan (Andrew Gierth <andrew@tao11.riddles.org.uk>) |
| Список | pgsql-hackers |
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> The model (assuming I understand it rightly) is that what we're actually
> tracking is a startup cost and a per-output-row cost, but for comparison
> purposes we actually store the rows and the computed total, rather than
> just the per-row cost:
> rows
> startup_cost
> total_cost = startup_cost + (rows * per_row_cost)
Right. I tend to think of it differently: the cost to retrieve the
first K rows out of a total of N is
startup_cost + (total_cost - startup_cost) * K/N
but that comes out to the same thing as what Andrew said.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера