Re: Mysteriously varying index scan costs - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Mysteriously varying index scan costs
Date
Msg-id 1104a63e897f3c29f44e617f40a33f99a1d80e2c.camel@cybertec.at
Whole thread Raw
In response to Re: Mysteriously varying index scan costs  (Pavan Deolasee <pavan.deolasee@gmail.com>)
List pgsql-general
Pavan Deolasee wrote:
> On Mon, Sep 24, 2018 at 2:20 PM, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> > 
> > But how can it be that the first run has to touch 74917 blocks,
> > while whe second run only needs to touch 1185?
> > 
> 
> The first index scan may have killed lots of index tuples.

So the first index scan visited lots of table tuples, found them
dead, and set the LP_DEAD flag on the corresponding index items
so that subsequent index scans could ignore them, right?

Thanks, that must be the correct explanation.  It correlates nicely
with the dirtied pages, too.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



pgsql-general by date:

Previous
From: "Mark Williams"
Date:
Subject: RE: PostgreSQl, PHP and IIS
Next
From: Adrian Klaver
Date:
Subject: Re: pgAdmin v4: The application server could not be contacted.