Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1FA9A4768F7; Thu, 23 Jan 2003 05:32:59 -0500 (EST) Received: from localhost.localdomain (unknown [194.204.44.121]) by postgresql.org (Postfix) with ESMTP id 1BF9F476A0F; Thu, 23 Jan 2003 05:30:55 -0500 (EST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id h0NAUsHf002610; Thu, 23 Jan 2003 12:30:55 +0200 Received: (from hannu@localhost) by localhost.localdomain (8.12.5/8.12.5/Submit) id h0NAUmw0002608; Thu, 23 Jan 2003 12:30:48 +0200 X-Authentication-Warning: localhost.localdomain: hannu set sender to hannu@tm.ee using -f Subject: Re: Terrible performance on wide selects From: Hannu Krosing To: Tom Lane Cc: Dann Corbit , Steve Crawford , pgsql-performance@postgreSQL.org, pgsql-hackers@postgreSQL.org In-Reply-To: <25521.1043280242@sss.pgh.pa.us> References: <25521.1043280242@sss.pgh.pa.us> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Message-Id: <1043317847.2347.35.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 23 Jan 2003 12:30:48 +0200 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/873 X-Sequence-Number: 34483 Tom Lane kirjutas N, 23.01.2003 kell 02:04: > "Dann Corbit" writes: > > Maybe I don't really understand the problem, but it seems simple enough > > to do it once for the whole query. > > We already do cache column offsets when they are fixed. The code that's > the problem executes when there's a variable-width column in the table > --- which means that all columns to its right are not at fixed offsets, > and have to be scanned for separately in each tuple, AFAICS. Not only varlen columns, but also NULL columns forbid knowing the offsets beforehand. -- Hannu Krosing