Обсуждение: Adding a column

Поиск
Список
Период
Сортировка

Adding a column

От
Bob Pawley
Дата:
Any thoughts on why dynamically adding a column to a table would require a run time of 24,000 + milliseconds??
 
Adding a serial column to three tables requires almost 100,000 ms.
 
Bob Pawley

Re: Adding a column

От
Tom Lane
Дата:
Bob Pawley <rjpawley@shaw.ca> writes:
> Any thoughts on why dynamically adding a column to a table would require =
> a run time of 24,000 + milliseconds??

Updating all the rows to store the default value, no doubt.  See
http://developer.postgresql.org/pgdocs/postgres/ddl-alter.html
especially the tip under 5.5.1.

            regards, tom lane