[PERFORM] queries are fast after dump-restore but slow again after some days dispite vacuum

2012-07-19 Thread Felix Scheicher
Hi, I am running a 9.1 server at Ubuntu. When I upgraded to the current version I did a pg_dump followed by pg_restore and found that the db was much faster. But slowed down again after two days. I did the dump-restore again and could now compare the two (actually identical) databases. This is

Re: [PERFORM] optimizing queries using IN and EXISTS

2012-07-19 Thread Nick Hofstede
Interesting. Thanks for the work-around. Regards, Nick -Original Message- From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of Tom Lane Sent: donderdag 19 juli 2012 0:36 To: Nick Hofstede Cc: pgsql-performance@postgresql.org Subject:

Re: [PERFORM] queries are fast after dump-restore but slow again after some days dispite vacuum

2012-07-19 Thread Andrew Dunstan
On 07/19/2012 07:33 AM, Felix Scheicher wrote: Hi, I am running a 9.1 server at Ubuntu. When I upgraded to the current version I did a pg_dump followed by pg_restore and found that the db was much faster. But slowed down again after two days. I did the dump-restore again and could now compare

Re: [PERFORM] queries are fast after dump-restore but slow again after some days dispite vacuum

2012-07-19 Thread Felix Scheicher
Andrew Dunstan andrew at dunslane.net writes: Try running CLUSTER on the relevant tables and see if it makes a difference. If it does you might want to look into using pg_reorg periodically. That worked like a charm! Many thanks. But how comes, the queries are also fast after a restore

Re: [PERFORM] queries are fast after dump-restore but slow again after some days dispite vacuum

2012-07-19 Thread Andrew Dunstan
On 07/19/2012 11:13 AM, Felix Scheicher wrote: Andrew Dunstan andrew at dunslane.net writes: Try running CLUSTER on the relevant tables and see if it makes a difference. If it does you might want to look into using pg_reorg periodically. That worked like a charm! Many thanks. But how comes,

Re: [PERFORM] queries are fast after dump-restore but slow again after some days dispite vacuum

2012-07-19 Thread Jeff Janes
On Thu, Jul 19, 2012 at 8:13 AM, Felix Scheicher mand...@web.de wrote: Andrew Dunstan andrew at dunslane.net writes: Try running CLUSTER on the relevant tables and see if it makes a difference. If it does you might want to look into using pg_reorg periodically. That worked like a charm!

Re: [PERFORM] queries are fast after dump-restore but slow again after some days dispite vacuum

2012-07-19 Thread Scott Marlowe
Are you running a lot of full table updates? On Thu, Jul 19, 2012 at 9:13 AM, Felix Scheicher mand...@web.de wrote: Andrew Dunstan andrew at dunslane.net writes: Try running CLUSTER on the relevant tables and see if it makes a difference. If it does you might want to look into using pg_reorg

Re: [PERFORM] queries are fast after dump-restore but slow again after some days dispite vacuum

2012-07-19 Thread mandavi
Try running CLUSTER on the relevant tables and see if it makes a difference. If it does you might want to look into using pg_reorg periodically. That worked like a charm! Many thanks. But how comes, the queries are also fast after a restore without the cluster? 2012/7/19 Scott Marlowe

[PERFORM] Deferred constraints performance impact ?

2012-07-19 Thread mark
Hi all, We have put some deferred constraints (some initially immediate, some initially deferred) into our database for testing with our applications. I haven't seen any noticeable loss in performance, but I am not sure I can properly simulate our full production environment load levels in my