Disk space consumption: character varying(255) versus text used for index

From: Marcel Ruff <ruff(at)netwake(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Disk space consumption: character varying(255) versus text used for index
Date: 2019-12-20 18:18:45
Message-ID: 9db72137-fd67-9450-379d-2cb7b51a53c2@netwake.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

my btree index for

   guid                | character varying(255)

is currently 6.9GB (almost all guid entries are of size 37bytes)

If I would change the data type to

  guid                | text

would the index size be reduced (without hitting performance)?

thank you
Marcel

--
NetwakeVision
Alte Owinger Straße 100
D-88662 Überlingen
Phone: +49 7551 309372
http://www.netwakevision.com
http://www.royal-gps.com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2019-12-20 18:55:44 Re: Disk space consumption: character varying(255) versus text used for index
Previous Message Justin 2019-12-19 00:01:39 Re: Renaming sequences