Re: [PERFORM] Avoiding Recheck Cond when using Select Distinct

2013-02-25 Thread Jeff Janes
On Mon, Feb 25, 2013 at 10:11 AM, Maciek Sakrejda wrote: > On Sat, Feb 23, 2013 at 3:53 PM, Jeff Janes wrote: > > It would really help to have "explain (analyze, buffers)". Especially if > > you turn on track_io_timing, (although that part probably can't be done > on > > Heroku, as it requires s

Re: [PERFORM] Avoiding Recheck Cond when using Select Distinct

2013-02-25 Thread Maciek Sakrejda
On Sat, Feb 23, 2013 at 3:53 PM, Jeff Janes wrote: > It would really help to have "explain (analyze, buffers)". Especially if > you turn on track_io_timing, (although that part probably can't be done on > Heroku, as it requires superuser access.) Right, that's not supported right now, although g

Re: [PERFORM] Avoiding Recheck Cond when using Select Distinct

2013-02-23 Thread Jeff Janes
On Fri, Feb 22, 2013 at 9:45 AM, Jack Royal-Gordon < j...@groundbreakingsoftware.com> wrote: > > On Feb 22, 2013, at 9:19 AM, Jeff Janes wrote: > > On Fri, Feb 22, 2013 at 8:36 AM, jackrg > wrote: > >> The following query produces a Recheck Cond and a costly Bitmap Heap Scan >> even though I hav

Re: [PERFORM] Avoiding Recheck Cond when using Select Distinct

2013-02-22 Thread Maciek Sakrejda
On Fri, Feb 22, 2013 at 9:59 AM, Vitalii Tymchyshyn wrote: >> Tuning Postgre is not an option, as the instance >> is provided by Heroku and as far as I know cannot be tuned by me. >> > Most tuning parameters can be set at per-query basis, so you can issue > alter database set param=value > to have

Re: [PERFORM] Avoiding Recheck Cond when using Select Distinct

2013-02-22 Thread Vitalii Tymchyshyn
2013/2/22 jackrg > Tuning Postgre is not an option, as the instance > is provided by Heroku and as far as I know cannot be tuned by me. > > Most tuning parameters can be set at per-query basis, so you can issue alter database set param=value to have same effect as if it was set through postgresql

Re: [PERFORM] Avoiding Recheck Cond when using Select Distinct

2013-02-22 Thread Jeff Janes
On Fri, Feb 22, 2013 at 8:36 AM, jackrg wrote: > The following query produces a Recheck Cond and a costly Bitmap Heap Scan > even though I have a composite index that covers both columns being > filtered > and selected. Can you show us the definition of that index? > I believe this is because

[PERFORM] Avoiding Recheck Cond when using Select Distinct

2013-02-22 Thread jackrg
The following query produces a Recheck Cond and a costly Bitmap Heap Scan even though I have a composite index that covers both columns being filtered and selected. I believe this is because the initial bitmap scan produces 2912 rows, which is too many for the available bitmap space. I've tried r