Unix Technical Forum

Percent of update completed

This is a discussion on Percent of update completed within the pgsql Novice forums, part of the PostgreSQL category; --> Is there a way to see how many rows of a table have been processed by an update? I've ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 08:28 PM
Colin McGuigan
 
Posts: n/a
Default Percent of update completed

Is there a way to see how many rows of a table have been processed by an
update? I've got an update on a 13,000,000 row table that's been
running for five days now. Five days is a good long time, especially
considering the size of the table, so I'm suspecting a problem. CPU is
pegged at 100%, so I'm relatively sure it's not an I/O bound issue. But
I'd hate to kill it if it's, say, 90% of the way through. No way I can
see to tell, though.

--Colin McGuigan

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 08:28 PM
Tom Lane
 
Posts: n/a
Default Re: Percent of update completed

Colin McGuigan <cmcguigan@earthcomber.com> writes:
> Is there a way to see how many rows of a table have been processed by an
> update? I've got an update on a 13,000,000 row table that's been
> running for five days now.


Not directly, but if you use the contrib/pgstattuple module you can get
readings on the numbers of committed and uncommitted tuples in the
table. The rate at which the uncommitted-tuples count increases would
tell you how fast the update is proceeding. (You should probably not
assume that you started with zero uncommitted tuples, unless you know
you'd vacuumed the table just beforehand.)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 08:29 PM
Colin McGuigan
 
Posts: n/a
Default Re: Percent of update completed

Tom Lane wrote:
> Not directly, but if you use the contrib/pgstattuple module you can get
> readings on the numbers of committed and uncommitted tuples in the
> table. The rate at which the uncommitted-tuples count increases would
> tell you how fast the update is proceeding. (You should probably not
> assume that you started with zero uncommitted tuples, unless you know
> you'd vacuumed the table just beforehand.)


Thanks, Tom.

I've run it, and I see the dead_tuple_count, but I don't see an
uncommitted count. The dead_tuple_count seems to oscillate, too -- it
increases slowly, but sometimes decreases immediately after. Is that
normal?

I don't see an uncommitted tuples count, though.

--Colin McGuigan

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com