Re: Adding new field to big table - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Adding new field to big table
Date
Msg-id CAMkU=1z-D4GnJGh6PNSg-e9eJSQ6t43ME9R5k7QQuRKXf_1bwQ@mail.gmail.com
Whole thread Raw
In response to Re: Adding new field to big table  ("acanada" <acanada@cnio.es>)
Responses Re: Adding new field to big table
List pgsql-performance
On Fri, Mar 14, 2014 at 10:06 AM, acanada <acanada@cnio.es> wrote:
Hello Jeff,

The lock time is not a problem. The problem is that takes too much time. I will need to add more fields to this table in the near future and I'd like to know if the process can be accelerated by any parameter, workaround or whatever...

Thank you for your answer.

OK.  Can you provide an explain (analyze, buffers), and the other information described here: http://wiki.postgresql.org/wiki/Slow_Query_Questions

It may be faster to make a new table by selecting a join on the existing tables and then replace the master table with it.

Also, if you are going to be doing a lot of bulk updates like this, lowering the fillfactor to below 50% might be helpful.
 
Cheers,

Jeff

pgsql-performance by date:

Previous
From: "acanada"
Date:
Subject: Re: Adding new field to big table
Next
From: "acanada"
Date:
Subject: Re: Adding new field to big table