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 914949DCA36 for ; Wed, 14 Dec 2005 18:18:28 -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 05326-09-3 for ; Wed, 14 Dec 2005 18:18:30 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from peufeu.com (boutiquenumerique.com [82.67.9.10]) by postgresql.org (Postfix) with ESMTP id E7BDC9DCA49 for ; Wed, 14 Dec 2005 18:18:25 -0400 (AST) Received: (qmail 2980 invoked from network); 14 Dec 2005 23:18:41 +0100 Received: from boutiquenumerique.com (HELO peufeu.com) (82.67.9.10) by boutiquenumerique.com with SMTP; 14 Dec 2005 23:18:41 +0100 To: "Zoltan Boszormenyi" Cc: pgsql-performance@postgresql.org Subject: Re: Auto-tuning a VIEW? References: <43A08EF5.4060306@dunaweb.hu> <43A09F1F.6030105@dunaweb.hu> Message-ID: Date: Wed, 14 Dec 2005 23:18:40 +0100 From: PFC Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <43A09F1F.6030105@dunaweb.hu> User-Agent: Opera M2/8.51 (Linux, build 1462) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/336 X-Sequence-Number: 16157 > Thanks, now the SELECT from the huge VIEW runs under one third of the > original runtime. Nice. >>> select * from v1 where code||num = 'AAA2005000001'; I do not know if it is at all possible, but maybe you could use a rule to, on select to your view, do instead a select on the two separate columns used in the key, with a bit of massaging on the values using substring()...