Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VI0sc-0006XK-TG for pgsql-performance@arkaria.postgresql.org; Fri, 06 Sep 2013 18:35:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VI0sc-000682-BD for pgsql-performance@arkaria.postgresql.org; Fri, 06 Sep 2013 18:35:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VI0sb-00066n-1U for pgsql-performance@postgresql.org; Fri, 06 Sep 2013 18:35:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VI0sY-0001eT-Jh for pgsql-performance@postgresql.org; Fri, 06 Sep 2013 18:35:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id r86IZWD3002216; Fri, 6 Sep 2013 14:35:32 -0400 From: Tom Lane To: Brian Fehrle cc: pgsql-performance@postgresql.org Subject: Re: View with and without ::text casting performs differently. In-reply-to: <522A05E1.1070103@consistentstate.com> References: <5229097C.4070401@consistentstate.com> <1960.1378425018@sss.pgh.pa.us> <522A05E1.1070103@consistentstate.com> Comments: In-reply-to Brian Fehrle message dated "Fri, 06 Sep 2013 10:42:09 -0600" Date: Fri, 06 Sep 2013 14:35:32 -0400 Message-ID: <2215.1378492532@sss.pgh.pa.us> X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Brian Fehrle writes: > On 09/05/2013 05:50 PM, Tom Lane wrote: >> I rather doubt that the now-explicit-instead-of-implicit casts have much >> to do with that. It seems more likely that you forgot to re-ANALYZE in >> the new database, or there are some different planner settings, or >> something along that line. > I have two versions of the view in place on the same server, one with > the typecasting and one without, and this is where I see the differences > (no ::text runs in 0.5ms and with ::text runs in 13 or so minutes with > nested loop), so it's all running off the same statistics on the data. Hm. Can you provide a self-contained example? regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance