Re: [GENERAL] Database performance problem

2007-06-12 Thread Tom Lane
"Porell, Chris" <[EMAIL PROTECTED]> writes: > NEW NEWS... turning off "enable_seqscan" made the query run in about .25 > seconds!!! [ squint... ] It was not the seqscans that were killing you, and changing just that setting wouldn't have moved the rowcount estimates one millimeter. I suppose thi

Re: [GENERAL] Database performance problem

2007-06-12 Thread Porell, Chris
hris Cc: 'pgsql-general@postgresql.org' Subject: Re: [GENERAL] Database performance problem "Porell, Chris" <[EMAIL PROTECTED]> writes: > Lastly, the EXPLAIN ANALYZE output. Do you have the equivalent for the old installation? >-> Nested Loop (cost=4387

Re: [GENERAL] Database performance problem

2007-06-12 Thread Tom Lane
"Porell, Chris" <[EMAIL PROTECTED]> writes: > Lastly, the EXPLAIN ANALYZE output. Do you have the equivalent for the old installation? >-> Nested Loop (cost=4387.04..9817.54 rows=1 width=4) (actual > time=1134.020..160195.837 rows=1842 loops=1) > Join Filter: (("inner".recordnumb

Re: [GENERAL] Database performance problem

2007-06-12 Thread Porell, Chris
-> Seq Scan on r (cost=0.00..6.27 rows=127 width=4) (actual time=0.008..0.221 rows=127 loops=1) -> Function Scan on results (cost=0.00..15.00 rows=333 width=36) (actual time=0.087..18.696 rows=11306 loops=4816) Filter: ( >= 25::numeric) Tota

Re: [GENERAL] Database performance problem

2007-06-12 Thread Andrej Ricnik-Bay
On 6/13/07, Porell, Chris <[EMAIL PROTECTED]> wrote: Hi All, [...] the SQL in psql. The old server was a dual AMD opteron 2.6 GHz machine with a RAID 5 array and 4GB memory. The new machine is a dual dual-core AMD Opteron 2.6GHz with RAID 1 and 16GB memory. [...] On my new DB server, it ta

Re: [GENERAL] Database performance problem

2007-06-12 Thread Steve Crawford
Porell, Chris wrote: > Hi All, > I've changed shared_buffers, checkpoint_segments, effective_cache_size and > random_page_cost in an attempt to improve performance. That has helped a > little... Another thought. Have you looked at "work_mem" - this is probably a far more important setting. The

Re: [GENERAL] Database performance problem

2007-06-12 Thread Steve Crawford
Porell, Chris wrote: > ... I snagged a SELECT from one of the reports. It is a > fairly complex query with 4 joins, which unfortunately I can't share. I can > say that the plan for the query on both machines looks nearly identical - > that is there are no sequential scans happening on the old DB

Re: [GENERAL] Database performance problem

2007-06-12 Thread Matthew T. O'Connor
Porell, Chris wrote: I have recently migrated a Postgres database from 7.4 running on gentoo to 8.1 running on SLES 10. I migrated the data using pg_dump and then running the SQL in psql. The old server was a dual AMD opteron 2.6 GHz machine with a RAID 5 array and 4GB memory. The new machine