Search Postgresql Archives

Re: Alter definition of a column

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

 



ksherlock@xxxxxxxxx wrote:
> Hello,
>
> The +4 is for the overhead of a varchar field.
>
> Using ALTER TABLE <table> ALTER <field> TYPE VARCHAR(<newsize>) to
> change the size requires scanning the entire table.  For large tables,
> this will be much slower than the pg_attribute query.  Both will get
> the job done.
>

Thanks.  Am I correct in assuming that this scanning of the entire
table is done when I use the 'ALTER TABLE' command and not something I
must do after it's done?

Thanks again for explaining it.  I was thinking that the +4 had
something to do with overhead of some sort, but wanted to know for
sure.

Andy



[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