From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruno Wolff III <bruno@wolff.to>
Cc: Loren M. Lang <lorenl@alzatex.com>
Cc: PostgreSQL Perfomance <pgsql-performance@postgresql.org>
Subject: Re: TEXT field and Postgresql Perfomance
Date: Sat, 08 Jan 2005 00:49:07 -0500
Message-ID: <3333.1105163347@sss.pgh.pa.us> (raw)
In-Reply-To: <20050108040323.GA13889@wolff.to>
References: <20050108033647.GB2867@alzatex.com>
<20050108040323.GA13889@wolff.to>
Bruno Wolff III <bruno@wolff.to> writes:
> On Fri, Jan 07, 2005 at 19:36:47 -0800,
> "Loren M. Lang" <lorenl@alzatex.com> wrote:
>> Do large TEXT or VARCHAR entries in postgresql cause any performance
>> degradation when a query is being executed to search for data in a table
>> where the TEXT/VARCHAR fields aren't being searched themselves?
> Yes in that the data is more spread out because of the wider rows and that
> results in more disk blocks being looked at to get the desired data.
You are overlooking the effects of TOAST. Fields wider than a kilobyte
or two will be pushed out-of-line and will thereby not impose a penalty
on queries that only access the other fields in the table.
(If Loren's notion of "large" is "a hundred bytes" then there may be a
measurable impact. If it's "a hundred K" then there won't be.)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, bruno@wolff.to, lorenl@alzatex.com
Subject: Re: TEXT field and Postgresql Perfomance
In-Reply-To: <3333.1105163347@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox