Re: Slow query: bitmap scan troubles

From: <postgresql(at)foo(dot)me(dot)uk>
To: "'postgres performance list'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Slow query: bitmap scan troubles
Date: 2012-12-06 12:52:07
Message-ID: 0b8901cdd3b0$83a55dd0$8af01970$@foo.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

That is very interesting indeed, these indexes are quite large!

I will apply that patch and try it out this evening and let you know.

Thank you very much everyone for your time, the support has been amazing.

PS: Just looked at this thread on the archives page and realised I don't
have my name in FROM: field, which is a misconfiguration of my email client,
but figured I would leave it to prevent confusion, sorry about that.

All the best,

Philip Scott

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 05 December 2012 18:05
To: Jeff Janes
Cc: postgresql(at)foo(dot)me(dot)uk; postgres performance list
Subject: Re: [PERFORM] Slow query: bitmap scan troubles

Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> I now see where the cost is coming from. In commit 21a39de5809 (first
> appearing in 9.2) the "fudge factor" cost estimate for large indexes
> was increased by about 10 fold, which really hits this index hard.

> This was fixed in commit bf01e34b556 "Tweak genericcostestimate's
> fudge factor for index size", by changing it to use the log of the
> index size. But that commit probably won't be shipped until 9.3.

Hm. To tell you the truth, in October I'd completely forgotten about the
January patch, and was thinking that the 1/10000 cost had a lot of history
behind it. But if we never shipped it before 9.2 then of course that idea
is false. Perhaps we should backpatch the log curve into 9.2 --- that would
reduce the amount of differential between what
9.2 does and what previous branches do for large indexes.

It would definitely be interesting to know if applying bf01e34b556 helps the
OP's example.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message postgresql 2012-12-06 12:56:26 Re: Slow query: bitmap scan troubles
Previous Message Simon Riggs 2012-12-06 12:47:37 Re: Commits 8de72b and 5457a1 (COPY FREEZE)

Browse pgsql-performance by date

  From Date Subject
Next Message Andrea Suisani 2012-12-06 12:53:23 Re: Re: xfs perform a lot better than ext4 [WAS: Re: Two identical systems, radically different performance]
Previous Message John Lister 2012-12-06 11:37:30 Re: xfs perform a lot better than ext4 [WAS: Re: Two identical systems, radically different performance]