Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TW84C-0006W1-EL for pgsql-performance@postgresql.org; Wed, 07 Nov 2012 16:01:24 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TW846-0001qF-BZ for pgsql-performance@postgresql.org; Wed, 07 Nov 2012 16:01:23 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TW84C-0005kQ-B4 for pgsql-performance@postgresql.org; Wed, 07 Nov 2012 17:01:24 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Nov 2012 17:01:24 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Nov 2012 17:01:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Ivan Voras Subject: Re: Unique values across a table of arrays - documents and tags Date: Wed, 07 Nov 2012 17:00:59 +0100 Lines: 32 Message-ID: References: <370680F7-B322-4241-8C23-8EA528EFE159@teksol.info> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA42A7E10829082AE397047C3" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120812 Thunderbird/14.0 In-Reply-To: X-Enigmail-Version: 1.4.3 X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201211/91 X-Sequence-Number: 48457 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA42A7E10829082AE397047C3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 wo= rds. 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... --------------enigA42A7E10829082AE397047C3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlCahbsACgkQ/QjVBj3/HSx2BwCfZM3kb70svpRo3mZd5fnVO9Bf fPAAoIvwV7CYSQv5Y4nUSPt5v6RP68cp =IFPZ -----END PGP SIGNATURE----- --------------enigA42A7E10829082AE397047C3--