From: Florian Weimer <fweimer@bfk.de>
To: Laszlo Nagy <gandalf@shopzeus.com>
Cc: pgsql-performance\@postgresql.org <pgsql-performance@postgresql.org>
Cc: Daniel Fekete <danieleff@gmail.com>
Subject: Re: Slow query + why bitmap index scan??
Date: Wed, 12 Jan 2011 13:42:42 +0000
Message-ID: <82y66qp7al.fsf@mid.bfk.de> (raw)
In-Reply-To: <4D2D9B1E.7080302@shopzeus.com>
References: <4D2D9B1E.7080302@shopzeus.com>
* Laszlo Nagy:
> This query:
>
> select hid from product_price_history where id=35547581
>
> Returns 759 rows in 8837 msec! How can this be that slow???
If most records are on different heap pages, processing this query
requires many seeks. 11ms per seek is not too bad if most of them are
cache misses.
--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
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: fweimer@bfk.de, gandalf@shopzeus.com, danieleff@gmail.com
Subject: Re: Slow query + why bitmap index scan??
In-Reply-To: <82y66qp7al.fsf@mid.bfk.de>
* 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