Skip site navigation (1) Skip section navigation (2)

Re: : Cost calculation for EXPLAIN output

From: Venkat Balaji <venkat(dot)balaji(at)verse(dot)in>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: PGSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: : Cost calculation for EXPLAIN output
Date: 2012-02-26 17:14:51
Message-ID: CAFrxt0jaSQ7ccfX9Oa_N7OPnXaNtaoQ9SEHgPDf3ZFgUEutbNQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
>
> > The cost is "13.88" to fetch 1 row by scanning an Primary Key
> > indexed column.
> >
> > Isn't the cost for fetching 1 row is too high ?
>
> I don't know, how many index pages will need to be randomly accessed
> in addition to the random heap access?  How many dead versions of
> the row will need to be visited besides the row which is actually
> visible?  How many of these pages are in shared_buffers?  How many
> of these pages are in OS cache?
>

Total Index pages are 140310. Yes. I suspect most of the times the required
page is found in either OS cache or disk (shared_buffers is .9 GB) as we
have 200+ GB of highly active database and the Index is on a 10GB table.

In response to

pgsql-performance by date

Next:From: Venkat BalajiDate: 2012-02-26 17:22:45
Subject: Re: : Cost calculation for EXPLAIN output
Previous:From: Andy ColsonDate: 2012-02-26 15:20:54
Subject: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group