Re: scan_recycle_buffers
От | Simon Riggs |
---|---|
Тема | Re: scan_recycle_buffers |
Дата | |
Msg-id | 1173477968.3641.360.camel@silverbirch.site обсуждение исходный текст |
Ответ на | Re: scan_recycle_buffers (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: scan_recycle_buffers
|
Список | pgsql-patches |
On Fri, 2007-03-09 at 16:45 -0500, Tom Lane wrote: > Heikki Linnakangas <heikki@enterprisedb.com> writes: > > I wonder if calling RelationGetNumberOfBlocks on every seq scan becomes > > a performance issue for tiny tables with for example just 1 page. It > > performs an lseek, which isn't free. > > We do that anyway; but certainly Simon's patch ought not be injecting > an additional one. It should be possible to pass that down from the planner to the executor, in certain cases. Or at least pass down the possibility that such a check might be worthwhile. Another approach might be to make the call after the first ~10 I/Os on a SeqScan, after which an lseek will be just noise. That way an all-in-cache scan would never need it at all. Thats easy to arrange because the hint is invoked from the exec nodes themselves. We probably need to get some measurements for the main benefit of the patch before we look further into those thoughts. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com
В списке pgsql-patches по дате отправления: