Re: Tuning New Server (slow function)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ron St-Pierre <ronDOTpgsql@xxxxxxx> writes:
> We just purchased a new Dell PowerEdge 2800 (dual xeon, 8GB RAM, raid 4, 
> RHEL, postgres 8.1) and ported our old database over to it (single cpu, 
> 2GB RAM, no raid, postgres 7.4). Our apps perform great on it, however 
> some queries are super slow. One function in particular, which used to 
> take 15-30 minutes on the old server, has been running now for over 12 
> hours:

A fairly common gotcha in updating is to forget to ANALYZE all your
tables after loading the data into the new server.  My bet is that some
of the queries in the function are using bad plans for lack of
up-to-date statistics.

If ANALYZEing and then starting a fresh session (to get rid of the
function's cached plans) doesn't help, you'll need to do some comparison
of EXPLAIN plans between old and new server to try to figure out where
the problem is.

			regards, tom lane


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux