Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miGvo-0008FS-Gy for pgsql-docs@arkaria.postgresql.org; Wed, 03 Nov 2021 14:08:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miGvm-0004bS-O9 for pgsql-docs@arkaria.postgresql.org; Wed, 03 Nov 2021 14:07:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miGvm-0004bD-8U for pgsql-docs@lists.postgresql.org; Wed, 03 Nov 2021 14:07:58 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miGvj-0001dA-V6 for pgsql-docs@lists.postgresql.org; Wed, 03 Nov 2021 14:07:57 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1miGvj-0001mI-7a; Wed, 03 Nov 2021 10:07:55 -0400 Date: Wed, 3 Nov 2021 10:07:55 -0400 From: Bruce Momjian To: grega.jesih@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: text fields and performance for ETL Message-ID: <20211103140755.GD5273@momjian.us> References: <163594615980.678.1904941309603792278@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <163594615980.678.1904941309603792278@wrigleys.postgresql.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Nov 3, 2021 at 01:29:19PM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/9.6/datatype-character.html > Description: > > Text field is a field that is intended for very big texts. > Performance within Postgres database is commented to be the same as for > normal varchar. > > But performance in ETL processes related to such data type is decreased > dramatically, because any process that takes this kind of data needs to > calculate its size on a row level and cannot take bigger chunks of data > based on max size. > > So the conclusion would be to use an appropriate character length that > reflects max string size. I have no idea what you are saying above. There is no additional overhead for TEXT vs VARCHAR() in Postgres so it seems like an overhead in applications. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.