Re: Caching number of blocks in relation to avoi lseek. - Mailing list pgsql-hackers

From Denis Perchine
Subject Re: Caching number of blocks in relation to avoi lseek.
Date
Msg-id 00061301132305.07937@dyp
Whole thread Raw
In response to Re: Caching number of blocks in relation to avoi lseek.  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
> > Question: is this field properly updated? Could it be used instead of RelationGetNumberOfBlocks
> > which calls lseek.
> 
> Probably should be kept up-to-date.  Currently only vacuum sets it.  It
> would have to be kept up-to-date for every INSERT/UPDATE that adds a block.

If we can acomplish this it will be quite big speed improvement. I saw lots of such calls
and strace show lots of lseek(,,END) calls. I would do this, but I do not know the code so
well to be sure I will walk through all places.

-- 
Sincerely Yours,
Denis Perchine

----------------------------------
E-Mail: dyp@perchine.com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Caching number of blocks in relation to avoi lseek.
Next
From: "valter m"
Date:
Subject: full text indexing & search