Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VxOuV-00046P-PD for pgsql-performance@arkaria.postgresql.org; Sun, 29 Dec 2013 22:32:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VxOuU-0003LH-DB for pgsql-performance@arkaria.postgresql.org; Sun, 29 Dec 2013 22:32:38 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VxOuS-0003L8-7j for pgsql-performance@postgresql.org; Sun, 29 Dec 2013 22:32:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VxOuN-00069h-Vt for pgsql-performance@postgresql.org; Sun, 29 Dec 2013 22:32:34 +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 rBTMWKrK030317; Sun, 29 Dec 2013 17:32:20 -0500 From: Tom Lane To: Ronaldo Maia cc: pgsql-performance@postgresql.org Subject: Re: Possible regression (slow query on 9.2/9.3 when compared to 9.1) In-reply-to: References: Comments: In-reply-to Ronaldo Maia message dated "Thu, 26 Dec 2013 17:49:29 -0200" Date: Sun, 29 Dec 2013 17:32:20 -0500 Message-ID: <30316.1388356340@sss.pgh.pa.us> X-Pg-Spam-Score: -2.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 Ronaldo Maia writes: > Recently I have tried to upgrade our postgres instalation from 9.1 to 9.3, > but one query in particular got extremelly slow. FWIW, this test case doesn't reproduce any problem for me --- I get identical plans and indistinguishable timings (about 450ms on my machine) from 9.1 and 9.3 branch tips. This is with all-default settings and a VACUUM ANALYZE after loading the data. I had to guess at the definition of stoq_normalize_string(), too, so I used create function stoq_normalize_string(text) returns text language sql strict immutable as 'select unaccent($1)'; I speculate that you forgot to analyze the data after loading, or there's some performance-relevant setting that you didn't carry forward from the 9.1 database. 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