X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E20803A50FF for ; Sat, 8 Jan 2005 05:49:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48541-09 for ; Sat, 8 Jan 2005 05:49:27 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1FCE23A50E8 for ; Sat, 8 Jan 2005 05:49:27 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j085n8n2003334; Sat, 8 Jan 2005 00:49:08 -0500 (EST) To: Bruno Wolff III Cc: "Loren M. Lang" , PostgreSQL Perfomance Subject: Re: TEXT field and Postgresql Perfomance In-reply-to: <20050108040323.GA13889@wolff.to> References: <20050108033647.GB2867@alzatex.com> <20050108040323.GA13889@wolff.to> Comments: In-reply-to Bruno Wolff III message dated "Fri, 07 Jan 2005 22:03:23 -0600" Date: Sat, 08 Jan 2005 00:49:07 -0500 Message-ID: <3333.1105163347@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/90 X-Sequence-Number: 9780 Bruno Wolff III writes: > On Fri, Jan 07, 2005 at 19:36:47 -0800, > "Loren M. Lang" 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