From: bricklen <bricklen@gmail.com>
To: Neil Whelchel <neil.whelchel@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow count(*) again...
Date: Tue, 12 Oct 2010 08:12:53 -0700
Message-ID: <AANLkTimXSWapozrZNdiRXDSm2hdsha1As94NwuS967As@mail.gmail.com> (raw)
In-Reply-To: <201010091626.18636.neil.whelchel@gmail.com>
References: <201010091626.18636.neil.whelchel@gmail.com>
On Sat, Oct 9, 2010 at 4:26 PM, Neil Whelchel <neil.whelchel@gmail.com> wrote:
> Maybe an
> estimate(*) that works like count but gives an answer from the index without
> checking visibility? I am sure that this would be good enough to make a page
> list, it is really no big deal if it errors on the positive side, maybe the
> list of pages has an extra page off the end. I can live with that. What I
> can't live with is taking 13 seconds to get a page of results from 850,000
> rows in a table.
> -Neil-
>
FWIW, Michael Fuhr wrote a small function to parse the EXPLAIN plan a
few years ago and it works pretty well assuming your stats are up to
date.
http://markmail.org/message/gknqthlwry2eoqey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: bricklen@gmail.com, neil.whelchel@gmail.com
Subject: Re: Slow count(*) again...
In-Reply-To: <AANLkTimXSWapozrZNdiRXDSm2hdsha1As94NwuS967As@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox