Re: [PERFORM] yet another q

2010-08-19 Thread Tom Lane
Samuel Gendler writes: > fast plan: http://explain.depesz.com/s/iZ > slow plan: http://explain.depesz.com/s/Dv2 Your problem here is that it's switching from hash aggregation to sort-and-group-aggregate once it decides that the number of aggregate groups won't fit in work_mem anymore. While you

Re: [PERFORM] yet another q

2010-08-18 Thread Samuel Gendler
The full set of conf changes that were in use during these tests are as follows: default_statistics_target = 100 # pgtune wizard 2010-08-17 maintenance_work_mem = 1GB # pgtune wizard 2010-08-17 constraint_exclusion = on # pgtune wizard 2010-08-17 checkpoint_completion_target = 0.9 # pgtune wizard

Re: [PERFORM] yet another q

2010-08-18 Thread Samuel Gendler
On Wed, Aug 18, 2010 at 11:14 PM, Samuel Gendler wrote: > Please forgive the barrage of questions. I'm just learning how to tune > things in postgres and I've still got a bit of learning curve to get over, > apparently. I have done a lot of reading, though, I swear. > > I've got two identical qu

[PERFORM] yet another q

2010-08-18 Thread Samuel Gendler
Please forgive the barrage of questions. I'm just learning how to tune things in postgres and I've still got a bit of learning curve to get over, apparently. I have done a lot of reading, though, I swear. I've got two identical queries except for a change of one condition which cuts the number o