Re: Help: massive parallel update to the same table - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Help: massive parallel update to the same table
Date
Msg-id 4D8325A2020000250003BA8D@gw.wicourts.gov
Whole thread Raw
In response to Help: massive parallel update to the same table  (Red Maple <redmapleleaf@gmail.com>)
List pgsql-performance
Red Maple <redmapleleaf@gmail.com> wrote:

> Our system has a postgres database that has a table for statistic
> which is updated every hour by about 10K clients. Each client only
> make update to its own row in the table. So far I am only seeing
> one core out of eight cores on my server being active which tells
> me that the update is being done serial instead of being parallel.
> Do you know if there is a way for me to make these independent
> updates happen in parallel?

It should be parallel by default.  Are you taking out any explicit
locks?

Also, it seems like you're only doing about three updates per
second.  I would expect a single-row update to run in a couple ms or
less, so it would be rare that two requests would be active at the
same time, so you wouldn't often see multiple cores active at the
same time.  (Of course, the background writer, autovacuum, etc.,
should occasionally show up concurrently with update queries.)

Is there some particular problem you're trying to solve?  (For
example, is something too slow?)

-Kevin

pgsql-performance by date:

Previous
From: Red Maple
Date:
Subject: Help: massive parallel update to the same table
Next
From: "Nicholson, Brad (Toronto, ON, CA)"
Date:
Subject: Re: Help: massive parallel update to the same table