Re: [PERFORM] Different query plans on same servers

2011-12-07 Thread Mario Splivalo
On 12/06/2011 09:00 PM, Tom Lane wrote: Mario Splivalo mario.spliv...@megafon.hr writes: I have 8.4.8 on producion and 8.4.9 on test, could that explain the difference in plans chosen? I'd wonder first if you have the same statistics settings on both. The big problem here is that the

Re: [PERFORM] Different query plans on same servers

2011-12-06 Thread Tom Lane
Mario Splivalo mario.spliv...@megafon.hr writes: I have 8.4.8 on producion and 8.4.9 on test, could that explain the difference in plans chosen? I'd wonder first if you have the same statistics settings on both. The big problem here is that the estimation of the join size is bad (8588 versus

Re: [PERFORM] Different query plans on same servers

2011-12-06 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: I'd wonder first if you have the same statistics settings on both. The big problem here is that the estimation of the join size is bad (8588 versus 0). But both servers develop that estimate for the join size. I was wondering more about whether the

Re: [PERFORM] Different query plans on same servers

2011-12-06 Thread Kevin Grittner
Kevin Grittner kevin.gritt...@wicourts.gov wrote: But both servers develop that estimate for the join size. [sigh] Those *were* both from the production server. Please show us the EXPLAIN ANALYZE from the other server. -Kevin -- Sent via pgsql-performance mailing list

Re: [PERFORM] Different query plans on same servers

2011-12-06 Thread Mario Splivalo
On 12/06/2011 09:00 PM, Tom Lane wrote: Mario Splivalo mario.spliv...@megafon.hr writes: I have 8.4.8 on producion and 8.4.9 on test, could that explain the difference in plans chosen? I'd wonder first if you have the same statistics settings on both. The big problem here is that the

Re: [PERFORM] Different query plans on same servers

2011-12-06 Thread Mario Splivalo
On 12/06/2011 09:17 PM, Kevin Grittner wrote: The hash join path must look more expensive on the first machine, for some reason. Mario, could you post the result of running this query from both servers?: http://wiki.postgresql.org/wiki/Server_Configuration Sure. Here is from the

Re: [PERFORM] Different query plans on same servers

2011-12-06 Thread Mario Splivalo
On 12/06/2011 09:29 PM, Kevin Grittner wrote: Kevin Grittner kevin.gritt...@wicourts.gov wrote: But both servers develop that estimate for the join size. [sigh] Those *were* both from the production server. Please show us the EXPLAIN ANALYZE from the other server. Huh, right... missed