Re: Unique values across a table of arrays - documents and tags

From: Florent Guillaume <fg(at)nuxeo(dot)com>
To: Ivan Voras <ivoras(at)freebsd(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Unique values across a table of arrays - documents and tags
Date: 2012-11-07 16:48:44
Message-ID: CAF-4BpMTfTHP6itgw-HfaSQQhcxe+bENo8D8fjvxcnRrhyR5DQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Nov 7, 2012 at 5:00 PM, Ivan Voras <ivoras(at)freebsd(dot)org> wrote:
> On 07/11/2012 16:54, Florent Guillaume wrote:
>> Maybe you could store the tags as fulltext words, query them using
>> fulltext search, and use ts_stat to gather the list of words? Needs to
>> be benched of course.
>> You'll probably need to change the config to avoid stemming and stop words.
>
> I have thought of that but decided not to even try because fts will also
> use GIN and the combination of fts on a text field + GIN cannot possibly
> be faster than just GIN on an array...

Unless ts_stat itself is optimized to reach inside the index to fetch
its statistics, but I don't think that's the case.

Florent

--
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2012-11-07 16:58:34 Re: Query completed in < 1s in PG 9.1 and ~ 700s in PG 9.2
Previous Message Merlin Moncure 2012-11-07 16:34:54 Re: Query completed in < 1s in PG 9.1 and ~ 700s in PG 9.2