Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMMpK-0000ND-D4 for pgsql-performance@arkaria.postgresql.org; Wed, 18 Sep 2013 18:50:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VMMpJ-00064c-FU for pgsql-performance@arkaria.postgresql.org; Wed, 18 Sep 2013 18:50:13 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMMpI-00064H-GL for pgsql-performance@postgresql.org; Wed, 18 Sep 2013 18:50:12 +0000 Received: from mail-pd0-f178.google.com ([209.85.192.178]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VMMpF-0007D3-9r for pgsql-performance@postgresql.org; Wed, 18 Sep 2013 18:50:11 +0000 Received: by mail-pd0-f178.google.com with SMTP id w10so7471807pde.9 for ; Wed, 18 Sep 2013 11:50:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=LiKtIQXuQALXxPng+QxMNC/WtHrMY4pRtm6PkGsbTBw=; b=LIrfh2xUx9rNoU5sgXIIgHPP4awPglajlHGMBquXw1QJx3NMX2VtMF7U5fhFofG9ug bXROqIZex+bUuH8VkSqC+e0C8ZMgjRIN/Um/+9JizG56g4rkhjEW9b8zXXFaByieHP5+ pSxnkmbCZ0ik828fFUAGJ0HbwPi5MKZfEihd0xF5e9ZgbPuh+b9y1KAj5xX6pKcom8ju 2p2bfvJfRCmbTEj5s1kN+59MqwMdJgd0wuapZ9TgxyJS5/j6XFZwvMaNdyUFkWb7bSpz opm4bEGSdcBImzwePsmjxg6RTamlefJahQm/nEtlIM1TMFBhuAJDQTJgszjbBu0DJ7dg e8LA== X-Gm-Message-State: ALoCoQkQvqz+pKekf2LslC1pemgUO9DJCuXBDwvQhRioK+M96oKkc7xq1JnsBmS/opsm1/RSUjYP X-Received: by 10.66.88.3 with SMTP id bc3mr43789067pab.48.1379530208193; Wed, 18 Sep 2013 11:50:08 -0700 (PDT) Received: from brianf.consistentstate.com (216-98-193-98.static.forethought.net. [216.98.193.98]) by mx.google.com with ESMTPSA id uw6sm4169267pbc.8.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 18 Sep 2013 11:50:07 -0700 (PDT) Message-ID: <5239F5DD.8090007@consistentstate.com> Date: Wed, 18 Sep 2013 12:50:05 -0600 From: Brian Fehrle User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Tom Lane CC: pgsql-performance@postgresql.org Subject: Re: View with and without ::text casting performs differently. References: <5229097C.4070401@consistentstate.com> <1960.1378425018@sss.pgh.pa.us> <522A05E1.1070103@consistentstate.com> <2215.1378492532@sss.pgh.pa.us> In-Reply-To: <2215.1378492532@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.0 (/) 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 On 09/06/2013 12:35 PM, Tom Lane wrote: > 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? I'll see what I can do to recreate this with bogus data. It's sensitive data that may just be some sort of anomaly in terms of the data distribution that is causing it. - Brian F > > 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