Re: 9.2 and index only scans

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 9.2 and index only scans
Date: 2012-08-26 14:31:50
Message-ID: 8297.1345991510@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas Kellerer <spam_eater(at)gmx(dot)net> writes:
> I'm playing around with 9.2 beta4 and was looking into the new Index Only Scan feature.
> I was a bit surprised that a "count(*)" query does not use an index.

Works for me. However, the cost estimate for that is heavily dependent
on how much of the table is known all-visible. If the table is getting
a lot of churn, or even just hasn't been vacuumed since it quiesced,
the planner will prefer a seqscan for this --- and it will be right.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matvey Teplov 2012-08-26 14:37:28 Re: Question about granting permissions
Previous Message Tom Lane 2012-08-26 14:25:53 Re: postmaster.pid file auto-clean up?