Skip site navigation (1) Skip section navigation (2)

Re: pg_trgm performance

From: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>
To: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>, "Florian Weimer" <fweimer(at)bfk(dot)de>, pgsql-performance(at)postgresql(dot)org
Subject: Re: pg_trgm performance
Date: 2007-02-24 01:04:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Hi Steinar,

On 2/24/07, Steinar H. Gunderson <sgunderson(at)bigfoot(dot)com> wrote:
> I'm sorry, I can no longer remember where I needed pg_trgm. Simple testing of
> your patch seems to indicate that the GiN version is about 65% _slower_ (18ms
> vs. 30ms) for a test data set I found lying around, but I remember that on
> the data set I needed it, the GIST version was a lot slower than that (think
> 3-400ms). The 18 vs. 30ms test is a random Amarok database, on 8.2.3
> (Debian).

Could you post EXPLAIN ANALYZE for both queries (after 2 or 3 runs)?
And if you can provide  EXPLAIN ANALYZE for a couple of searches
(short length, medium length and long) in both cases, it could be nice

The GiN version is not selective enough currently compared to GiST. It
generally finds the matching rows faster but it has a slower recheck
cond so it's sometimes interesting (in my case) and sometimes not that
interesting (it seems to be your case).



In response to


pgsql-performance by date

Next:From: GeoffreyDate: 2007-02-24 01:28:31
Subject: Re: which Xeon processors don't have the context switching problem
Previous:From: Magnus HaganderDate: 2007-02-24 00:56:22
Subject: Re: which Xeon processors don't have the context switching problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group