Re: Bitmap Heap Scan anomaly - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Bitmap Heap Scan anomaly
Date
Msg-id 1178236242.28383.304.camel@dogma.v10.wvs
Whole thread Raw
In response to Bitmap Heap Scan anomaly  (jaba the mobzy <makaronaforna@yahoo.com>)
Responses Re: Bitmap Heap Scan anomaly
List pgsql-hackers
On Thu, 2007-05-03 at 14:33 -0700, jaba the mobzy wrote:
> mycorr_100 took 11.4 s to run although it had to fetch 100000 row from
> the base table.
> mycorr_10 took 24.4 s to run although it had to fetch 10563 row from
> the base table.

This is because the physical distribution of data is different. The
mycorr_10 table has tuples in which a and b are > 15.9M spread all
throughout. mycorr_100 has them all collected together at the end of the
physical file. Less disk seeking.

You can test this by doing a CLUSTER on both tables and run the same
queries again.

Regards,Jeff Davis






pgsql-hackers by date:

Previous
From: jaba the mobzy
Date:
Subject: Bitmap Heap Scan anomaly
Next
From: Tom Lane
Date:
Subject: Re: Bitmap Heap Scan anomaly