public inbox for [email protected]help / color / mirror / Atom feed
Disk space consumption: character varying(255) versus text used for index 5+ messages / 4 participants [nested] [flat]
* Disk space consumption: character varying(255) versus text used for index @ 2019-12-20 18:18 Marcel Ruff <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Marcel Ruff @ 2019-12-20 18:18 UTC (permalink / raw) To: 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 ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Disk space consumption: character varying(255) versus text used for index @ 2019-12-20 18:55 Tom Lane <[email protected]> parent: Marcel Ruff <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Tom Lane @ 2019-12-20 18:55 UTC (permalink / raw) To: [email protected]; +Cc: pgsql-novice Marcel Ruff <[email protected]> writes: > 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)? Wouldn't make any difference at all. regards, tom lane ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Disk space consumption: character varying(255) versus text used for index @ 2019-12-20 19:06 Justin <[email protected]> parent: Tom Lane <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Justin @ 2019-12-20 19:06 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: [email protected]; pgsql-novice Have question this states the GUID is the text Hex value form a UUID if so that 36bytes long vs integer that is 128bits if that is the case convert this GUID to UUID type or am i missing something? On Fri, Dec 20, 2019 at 1:55 PM Tom Lane <[email protected]> wrote: > Marcel Ruff <[email protected]> writes: > > 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)? > > Wouldn't make any difference at all. > > regards, tom lane > > > ^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: Disk space consumption: character varying(255) versus text used for index @ 2019-12-21 14:41 Stephen Froehlich <[email protected]> parent: Justin <[email protected]> 0 siblings, 1 reply; 5+ messages in thread From: Stephen Froehlich @ 2019-12-21 14:41 UTC (permalink / raw) To: ; +Cc: [email protected] <[email protected]>; pgsql-novice Just to make it a little more clear, PostgreSQL has a binary UUID type that should house your GUID’s perfectly efficiently. (It also provides a lot of other useful functionality and speed improvements): https://www.postgresql.org/docs/12/datatype-uuid.html From: Justin <[email protected]> Sent: Friday, December 20, 2019 12:06 PM To: Tom Lane <[email protected]> Cc: [email protected]; [email protected] Subject: Re: Disk space consumption: character varying(255) versus text used for index Have question this states the GUID is the text Hex value form a UUID if so that 36bytes long vs integer that is 128bits if that is the case convert this GUID to UUID type or am i missing something? On Fri, Dec 20, 2019 at 1:55 PM Tom Lane <[email protected]<mailto:[email protected]>> wrote: Marcel Ruff <[email protected]<mailto:[email protected]>> writes: > 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)? Wouldn't make any difference at all. regards, tom lane ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Disk space consumption: character varying(255) versus text used for index @ 2019-12-21 17:09 Marcel Ruff <[email protected]> parent: Stephen Froehlich <[email protected]> 0 siblings, 0 replies; 5+ messages in thread From: Marcel Ruff @ 2019-12-21 17:09 UTC (permalink / raw) To: Stephen Froehlich <[email protected]>; +Cc: pgsql-novice Thank you for the hints, this helps a lot. I love PostgreSQL, Marcel Am 21.12.19 um 15:41 schrieb Stephen Froehlich: > > Just to make it a little more clear, PostgreSQL has a binary UUID type > that should house your GUID’s perfectly efficiently. (It also provides > a lot of other useful functionality and speed improvements): > > > > https://www.postgresql.org/docs/12/datatype-uuid.html > > > > > > > > *From:* Justin <[email protected]> > *Sent:* Friday, December 20, 2019 12:06 PM > *To:* Tom Lane <[email protected]> > *Cc:* [email protected]; [email protected] > *Subject:* Re: Disk space consumption: character varying(255) versus > text used for index > > > > Have question this states the GUID is the text Hex value form a UUID > if so that 36bytes long vs integer that is 128bits if that is the > case convert this GUID to UUID type > > > > or am i missing something? > > > > On Fri, Dec 20, 2019 at 1:55 PM Tom Lane <[email protected] > <mailto:[email protected]>> wrote: > > Marcel Ruff <[email protected] <mailto:[email protected]>> writes: > > 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)? > > Wouldn't make any difference at all. > > regards, tom lane > -- NetwakeVision Alte Owinger Straße 100 D-88662 Überlingen Phone: +49 7551 309372 http://www.netwakevision.com http://www.royal-gps.com ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2019-12-21 17:09 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-12-20 18:18 Disk space consumption: character varying(255) versus text used for index Marcel Ruff <[email protected]> 2019-12-20 18:55 ` Tom Lane <[email protected]> 2019-12-20 19:06 ` Justin <[email protected]> 2019-12-21 14:41 ` Stephen Froehlich <[email protected]> 2019-12-21 17:09 ` Marcel Ruff <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox