Search Postgresql Archives

Re: Is it possible to speed up addition of "not null"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 02, 2012 at 02:20:59PM +0100, hubert depesz lubaczewski wrote> 
> Sure. But at least theoretically, it could use index - for example, if
> I had index "where column is null".

To build that index, you had to visit every row too.  But I see what
your problem is.

> But this should be nearly instantenous. This machine is very busy. In
> the low-traffic moments we have ~ 5k transactions per second.

[. . .]

> This table is concurrently used. Taking it offline is not an option.

It's this.  You don't have low enough traffic to get the lock you need
on the table.  You're changing the schema of the table, and you need
to lock it while you do that.  Probably you're not getting the lock
you need granted and therefore it seems like it's taking a long time.

A

-- 
Andrew Sullivan
ajs@xxxxxxxxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux