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. Florent On Wed, Nov 7, 2012 at 4:38 PM, Ivan Voras <ivoras@xxxxxxxxxxx> wrote: > On 07/11/2012 16:34, François Beausoleil wrote: >> Le 2012-11-07 à 10:21, Ivan Voras a écrit : > >>> Barring that, what would you suggest for efficiently handing a classic >>> structure like this (meaning documents with tags)? >> >> Can you structure it as the "classic" many to many pattern: >> >> documents <-> taggings <-> tags > > Yes, that is as you said, a classic solution to a classic problem :) > > If needed, this is the way I will do it, but for now I'm asking if > there's something that can be done to avoid creating another table or > two. The reason I'm asking is that I've often found that PostgreSQL can > do much more than I thought it can. > > > -- 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 -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance