Does a varchar field's declared size have any impact in PostgreSQL?

前端 未结 3 872
迷失自我
迷失自我 2020-12-17 08:05

Is VARCHAR(100) any better than VARCHAR(500) from a performance point of view? What about disk usage?

Talking about PostgreSQL today, not some database some time in

3条回答
  •  鱼传尺愫
    2020-12-17 08:21

    There is no difference between varchar(m) and varchar(n)..

    http://archives.postgresql.org/pgsql-admin/2008-07/msg00073.php

    There is a difference between varchar(n) and text though, varchar(n) has a built in constraint which must be checked and is actually a little slower.

    http://archives.postgresql.org/pgsql-general/2009-04/msg00945.php

提交回复
热议问题