Re: Full text search with ORDER BY performance issue

Поиск
Список
Период
Сортировка
От Devin Ben-Hur
Тема Re: Full text search with ORDER BY performance issue
Дата
Msg-id 4A651647.6030205@whitepages.com
обсуждение исходный текст
Ответ на Full text search with ORDER BY performance issue  (Krade <krade@krade.com>)
Ответы Re: Full text search with ORDER BY performance issue
Список pgsql-performance
Krade wrote:
> SELECT * FROM a WHERE comment_tsv @@ plainto_tsquery('love') ORDER BY
> timestamp DESC LIMIT 24 OFFSET 0;

Have you tried make the full-text condition in a subselect with "offset
0" to stop the plan reordering?

eg:

select *
from (
   select * from a where comment_tsv @@ plainto_tsquery('love')
   offset 0
) xx
order by timestamp DESC
limit 24
offset 0;


See http://blog.endpoint.com/2009/04/offset-0-ftw.html

--
-Devin

В списке pgsql-performance по дате отправления:

Предыдущее
От: Krade
Дата:
Сообщение: Re: Full text search with ORDER BY performance issue
Следующее
От: Andy Colson
Дата:
Сообщение: Re: Used computers?