Re: performance of bitmap scans in nested loop joins - Mailing list pgsql-hackers

From Tom Lane
Subject Re: performance of bitmap scans in nested loop joins
Date
Msg-id 18748.1115264904@sss.pgh.pa.us
Whole thread Raw
In response to performance of bitmap scans in nested loop joins  ("Sergey E. Koposov" <math@sai.msu.ru>)
Responses Re: performance of bitmap scans in nested loop joins
List pgsql-hackers
"Sergey E. Koposov" <math@sai.msu.ru> writes:
> On Fri, 29 Apr 2005, Tom Lane wrote:
>> The latter is (or should be) doing slightly *less* work, so why is it
>> taking almost twice as much time?  Can you get gprof profiles of the
>> two cases?

> I've got them. I attached two files with a little bit truncated output of 
> gprof. 

I figured out part of the problem: I had made nodeBitmapIndexscan
re-open the index on each call, thinking that that would save amrescan
calls.  But an amrescan is a whole lot cheaper than index open/close,
so that was a bad tradeoff.

This seems to account for about half of the slowdown you exhibited.
I'm not sure where the other half went ... gprof isn't turning up
any obvious candidates.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: bitmap scan and explain analyze
Next
From: Oleg Bartunov
Date:
Subject: 'infinity' in GiST index