Re: Full text search with ORDER BY performance issue

From: Marcin Stępnicki <mstepnicki(at)gmail(dot)com>
To: Krade <krade(at)krade(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Full text search with ORDER BY performance issue
Date: 2009-07-20 12:22:03
Message-ID: 179149fe0907200522s299b619ekd5f4517ddb767181@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, Jul 19, 2009 at 12:07 AM, Krade<krade(at)krade(dot)com> wrote:
> archive=> explain analyze select * from a where  comment_tsv @@
> plainto_tsquery('love') order by timestamp desc limit 24 offset 0;

What happens if you make it:

select * from (
select * from a where comment_tsv @@plainto_tsquery('love')
) xx

order by xx.timestamp desc
limit 24 offset 0;

?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tim Landscheidt 2009-07-20 13:18:46 XMLPARSE() evaluated multiple times?
Previous Message Oleg Bartunov 2009-07-20 12:12:20 Re: Full text search with ORDER BY performance issue