Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZQKb-0002wb-RI for pgsql-performance@arkaria.postgresql.org; Tue, 08 Sep 2015 21:21:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZZQKb-0008Er-8H for pgsql-performance@arkaria.postgresql.org; Tue, 08 Sep 2015 21:21:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZZQKa-0008Cg-3h for pgsql-performance@postgresql.org; Tue, 08 Sep 2015 21:21:32 +0000 Received: from mail-wi0-f182.google.com ([209.85.212.182]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZZQKX-0008K8-6W for pgsql-performance@postgresql.org; Tue, 08 Sep 2015 21:21:30 +0000 Received: by wicfx3 with SMTP id fx3so134924946wic.1 for ; Tue, 08 Sep 2015 14:21:27 -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 :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=KffykIN69j1h7HG4SkHd/juGFdK+qGiKLhLFmOx6itk=; b=AIlk1+FgbN5oYmJ+o+Uqn5UZw7mz7HWdrT9FcFms9879BW/mDQulGEYfAvVJclGwtl jPMAzYeKvzsVO05Iti/Mfsfq0lJFeN+wII6lCbUeAfecStOGICEon9sETcleA9rrVeEW OgVpW7YFosJs4O6aXQOf1tlHZDQbS61V4iizxhXetUXh/kKkaBskNI8gqcwuh8NdWzzv EUP0FADnhaknJJZLkRAveuxxef/IG4uFCQ0Ftu2aUJrbuWnAzgcRs9bxzm94KUMbqoP2 eLcNPx1XFz9ZrJrTVjaBTyt96TqzwywlMU9RMjYrF/ANrgA1dzLwllLmzFHTmGhtwjyK xgXQ== X-Gm-Message-State: ALoCoQl6vYVKMJFg61nU7P8LAJr6AbFajmD/kLXtvVYtaxjBtJLayuRz/pCvNsmactWZJVAgln73fwKmct8MEPRGictYEPiERKpnBwBB2ajO7Pkpos4dOq5CQdC37p/ht4zI8A+nKU5G1OzDl0dtWgw+2dtXy04yAE2TQHTpOo0THnZPS6RCtgabswwd7sAsJKilwlepWk8gD/PAvexf4ZDHlJXtP1SvtQ== X-Received: by 10.194.158.234 with SMTP id wx10mr21218704wjb.120.1441747286953; Tue, 08 Sep 2015 14:21:26 -0700 (PDT) Received: from [10.137.2.12] (athedsl-4365271.home.otenet.gr. [79.130.11.199]) by smtp.gmail.com with ESMTPSA id lq9sm6772729wjb.35.2015.09.08.14.21.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 14:21:26 -0700 (PDT) Message-ID: <55EF5151.7070409@2ndquadrant.com> Date: Tue, 08 Sep 2015 23:21:21 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: query with pg_trgm sometimes very slow References: <55E7010F.8010700@vboehm.de> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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/08/2015 09:15 PM, Merlin Moncure wrote: ... >> I just had the exact same problem, and indeed gin fares much better. > > Also, with 9.5 we will see much better worst case performance from gin > via Jeff's patch: > http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=97f3014647a5bd570032abd2b809d3233003f13f > > (I had to previously abandon pg_tgrm for a previous project and go > with solr; had this patch been in place that would not have happened) Except that pg_tgrm-1.2 is not included in 9.5, because it was committed in July (i.e. long after 9.5 was branched). -- Tomas Vondra http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance