X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0004E9DCC7F for ; Wed, 1 Mar 2006 11:16:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 05098-07 for ; Wed, 1 Mar 2006 11:16:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id C37AB9DCC2E for ; Wed, 1 Mar 2006 11:16:05 -0400 (AST) 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 k21FG8V2010653; Wed, 1 Mar 2006 10:16:08 -0500 (EST) To: PFC cc: pgsql-performance@postgresql.org Subject: Re: Bad plan on a view In-reply-to: References: Comments: In-reply-to PFC message dated "Wed, 01 Mar 2006 15:56:25 +0100" Date: Wed, 01 Mar 2006 10:16:08 -0500 Message-ID: <10652.1141226168@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200603/5 X-Sequence-Number: 17442 PFC writes: > So, in order to speed up requests which need a full table scan, I wanted > to put the text fields in another table, and use a view to make it look > like nothing happened. Also, the small table used for searching is a lot > more likely to fit in RAM than the big table with all the text which is > only used for display. Aren't you going to a lot of work to reinvent something that TOAST already does for you? (At least, in the cases where the text fields are wide enough that it really matters.) regards, tom lane