Re: ORDER BY using index, tsearch2 - Mailing list pgsql-performance

From Janek Sendrowski
Subject Re: ORDER BY using index, tsearch2
Date
Msg-id trinity-8e504cd8-9ad3-487e-ae13-68e6f8dff0c3-1386810038087@3capp-webde-bs45
Whole thread Raw
In response to Re: ORDER BY using index, tsearch2 [READ THIS!]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ORDER BY using index, tsearch2
List pgsql-performance
Sorry, I still wanted to add following link:
http://www.sai.msu.su/~megera/postgres/talks/Full-text%20search%20in%20PostgreSQL%20in%20milliseconds-extended-version.pdf
On page 6 you can see the first example:

"postgres=# explain analyze
SELECT docid, ts_rank(text_vector, to_tsquery('english', 'title')) AS rank
FROM ti2
WHERE text_vector @@ to_tsquery('english', 'title')
ORDER BY text_vector>< plainto_tsquery('english','title')
LIMIT 3;"

"Limit (cost=20.00..21.65 rows=3 width=282) (actual time=18.376..18.427 rows=3 loops=-> Index Scan using ti2_index on
ti2(cost=20.00..26256.30 rows=47692 width=282) 
(actual time=18.375..18.425 rows=3 loops=1)
Index Cond: (text_vector @@ '''titl'''::tsquery)
Order By: (text_vector >< '''titl'''::tsquery)"

My PG-version is 9.3.
I was wondering about this feature, bacause I haven't seen it yet and it a huge speed up.

Sorry, I thought the name is still tsearch, because the functionnames are roughly the same, but now know I noticed,
thatthis name is obsolete. 

Janek Sendrowski


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: ORDER BY using index, tsearch2
Next
From: Mack Talcott
Date:
Subject: Re: Debugging shared memory issues on CentOS