Re: Slow query + why bitmap index scan??

From: Florian Weimer <fweimer(at)bfk(dot)de>
To: Laszlo Nagy <gandalf(at)shopzeus(dot)com>
Cc: "pgsql-performance\(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>, Daniel Fekete <danieleff(at)gmail(dot)com>
Subject: Re: Slow query + why bitmap index scan??
Date: 2011-01-12 13:42:42
Message-ID: 82y66qp7al.fsf@mid.bfk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

* 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(at)bfk(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mladen Gogala 2011-01-12 13:49:01 The good, old times
Previous Message Laszlo Nagy 2011-01-12 12:14:22 Slow query + why bitmap index scan??