Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iijXn-00015D-Ij for pgsql-novice@arkaria.postgresql.org; Sat, 21 Dec 2019 18:32:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iijXm-0005W0-22 for pgsql-novice@arkaria.postgresql.org; Sat, 21 Dec 2019 18:32:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iiiGc-0004pT-1D for pgsql-novice@lists.postgresql.org; Sat, 21 Dec 2019 17:10:14 +0000 Received: from intra.netwake.com ([88.198.43.220]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1iiiGY-0003SM-Tu for pgsql-novice@postgresql.org; Sat, 21 Dec 2019 17:10:12 +0000 Received: from localhost (localhost [127.0.0.1]) by NetwakeIntra (Postfix) with ESMTP id BDBE5EC0662; Sat, 21 Dec 2019 18:10:08 +0100 (CET) Received: from intra.netwake.com ([127.0.0.1]) by localhost (intra.netwake.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g6pIsCNJpVLb; Sat, 21 Dec 2019 18:10:07 +0100 (CET) Received: from [192.168.1.10] (unknown [37.49.124.28]) (Authenticated sender: marcel) by NetwakeIntra (Postfix) with ESMTPSA id A57F0EC008E; Sat, 21 Dec 2019 18:10:07 +0100 (CET) Reply-To: ruff@netwake.com Subject: Re: Disk space consumption: character varying(255) versus text used for index To: Stephen Froehlich Cc: "pgsql-novice@postgresql.org" References: <9db72137-fd67-9450-379d-2cb7b51a53c2@netwake.com> <10867.1576868144@sss.pgh.pa.us> From: Marcel Ruff Autocrypt: addr=ruff@netwake.com; prefer-encrypt=mutual; keydata= xsBNBFH/V6UBCADD9VL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Osjx8QtbjmMOkDoXIK3s67KCAXBwtLSQ0c+GDnPoFOFd MGFQjGrhxceOqfOjv1wyem8LK9iiHz+Evf/Sz07kkGWB5AHplM09TjVVniQbpE+IDBDZs+pH 2uJHDrVTxQvRn9S82Xd0wjCbRuPPABEBAAHCwI0EGAECACACGwwWIQRfPmS9MIsTocOwh980 VVz6rjbqVgUCW3UtnwAhCRA0VVz6rjbqVhYhBF8+ZL0wixOhw7CH3zRVXPquNupWPfYH/26x Z2j0u0DjczbHJD+19UzoKGhjx8+9+lYRfkTgnU9ZsYyugG56A0EMiFlZL4JmPqFbqPQLuFSM IkaKuigf9YYtF4y1cRxVdXkVHJ3dujvJRz4eBs72a4c6M0yC5k3C3rS6pk8yLkiY4M9JVtb5 gcPUozQqi2lhEyfrFeBfdteBWPi5qxh8XBN0lQHuewHex+45Gd7roZtnQzlLjxWQEqTjAgdj gnBXJvU72lYtLptw5XNp+xAdjqFB4s2B4bfbxTlVkYT/0Srtj8zs5586jKQh6aAyw+mXpm/O 68k1iQXvKWCdpeFSfCrRt7ajDXThgPkdP2DW9wVJHS0uhujESms= Organization: Netwake GmbH Message-ID: <0edae0c2-528a-0bc6-fda1-942f1342e030@netwake.com> Date: Sat, 21 Dec 2019 18:09:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------0481B060F2B3029A52F5B922" Content-Language: de-DE List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------0481B060F2B3029A52F5B922 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 > *Sent:* Friday, December 20, 2019 12:06 PM > *To:* Tom Lane > *Cc:* ruff@netwake.com; pgsql-novice@postgresql.org > *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 > wrote: > > Marcel Ruff > 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 --------------0481B060F2B3029A52F5B922 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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 <zzzzz.graf@gmail.com>
Sent: Friday, December 20, 2019 12:06 PM
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: ruff@netwake.com; pgsql-novice@postgresql.org
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 <tgl@sss.pgh.pa.us> wrote:

Marcel Ruff <ruff@netwake.com> 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
--------------0481B060F2B3029A52F5B922--