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

Re: Full text search with ORDER BY performance issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Krade <krade(at)krade(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Full text search with ORDER BY performance issue
Date: 2009-07-29 14:22:24
Message-ID: 17530.1248877344@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> If love is an uncommon word, there's no help for queries of this type
> being slow unless the GIN index can return the results in order.  But
> if love is a common word, then it would be faster to do an index scan
> by timestamp on the baserel and then treat comment_tsv @@
> plainto_tsquery('love') as a filter condition.  Is this a selectivity
> estimation bug?

Doesn't look like it: estimated number of matches is 253635, actual is
259828, which is really astonishingly close considering what we have to
work with.  It's not clear though what fraction of the total that
represents.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Robert HaasDate: 2009-07-29 15:13:34
Subject: Re: Full text search with ORDER BY performance issue
Previous:From: PFCDate: 2009-07-29 14:18:38
Subject: Re: Full text search with ORDER BY performance issue

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