Skip site navigation (1) Skip section navigation (2)

Re: Analyze on temp table taking very long

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mahadevan, Mridula" <Mridula(dot)Mahadevan(at)ironmountain(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Analyze on temp table taking very long
Date: 2011-03-22 22:56:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
"Mahadevan, Mridula" <Mridula(dot)Mahadevan(at)ironmountain(dot)com> writes:
> This has been running fine for a while on multiple setups, large and small volumes. The setups all have the same hardware configuration.

> On one particular setup with about 200k records and this analyze runs for 45min and then times out(statement timeout is set to 45 min). typically this takes a few seconds at best. But when I move the analyze outside the loop everything runs fine.

Is it actually *running*, as in doing something, or is it just blocked?
I can't immediately think of any reason for some other process to have
a lock on a temp table that belongs to your process; but it seems
unlikely that ANALYZE would randomly take much longer than expected
unless something was preventing it from making progress.

Look into pg_locks and/or watch the backend with strace next time this

			regards, tom lane

In response to


pgsql-performance by date

Next:From: felixDate: 2011-03-23 00:52:55
Subject: good old VACUUM FULL
Previous:From: Josh BerkusDate: 2011-03-22 21:24:36
Subject: Re: Performance on AIX

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group