progress of long running operation

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: progress of long running operation
Date: 2012-12-27 19:33:13
Message-ID: F174D8E8-1BB5-4F53-B408-25B8A0E23C4C@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there any way to get some insight into the progress of:

insert into foo select distinct on (...) from bar where...

It's got to with importing some legacy data, which has no proper primary key, and duplicates, and garbage that won't be accepted. And there's 30,000,000 rows, and I'm running on a slow disk for testing--so I know this is going to be painfully slow. But after a few hours I'd like to know if it's going to finish overnight, or if it will take so long that I need to look at alternate approaches.

(I upped my shared buffers & work mem, so explain on the select statement shows a bit better than 50% reduction in predicted work for that part. And I will go ahead and drop all indexes on the target table.)

--
Scott Ribe
scott_ribe(at)elevated-dev(dot)com
http://www.elevated-dev.com/
(303) 722-0567 voice

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-12-27 19:46:48 Re: progress of long running operation
Previous Message Tom Lane 2012-12-27 19:02:02 Re: libpq thread safety