[PERFORM] Different query plans on same servers

2011-12-06 Thread Mario Splivalo
I have a fairly simple query: SELECT some columns FROM tubesite_image INNER JOIN tubesite_object ON (tubesite_image.object_ptr_id = tubesite_object.id) WHERE tubesite_object.site_id = 8 ORDER BY tubesite_object.pub_date ASC LIMIT 21; That query is having a bad query

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

[PERFORM] Response time increases over time

2011-12-06 Thread Havasvölgyi Ottó
Hi all, I am running a load simulation on Debian with PostgreSQL 8.4.9 (standard Debian package). Certain number of clients do the following stepsin a transaction (read commited level) periodically (about 1.1 transaction per second / client) and concurrently: -reads a record of table Machine

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

Re: [PERFORM] Response time increases over time

2011-12-06 Thread Josh Berkus
On 12/6/11 4:30 PM, Havasvölgyi Ottó wrote: Is there so much difference between 8.4 and 9.1, or is this something else? Please tell me if any other info is needed. It is fairly likely that the difference you're seeing here is due to improvements made in checkpointing and other operations made

Re: [PERFORM] Question about VACUUM

2011-12-06 Thread Josh Berkus
On 12/5/11 1:36 PM, Kevin Grittner wrote: I understand the impulse to run autovacuum less frequently or less aggressively. When we first started running PostgreSQL the default configuration was very cautious. The default settings are deliberately cautious, as default settings should be. But