Home postgresql full text search function syntax
Reply: 0

postgresql full text search function syntax

user580 Published in May 22, 2018, 12:11 am

In postgres database we have a table table1 and with column column1 which type is text. And we created an index to that column CREATE INDEX idx_column1 ON table1 USING gin (to_tsvector('english', column1));

question is, why when we execute this query

FROM table1
where to_tsvector('english', column1) @@ to_tsquery('searchedText')

index is used, but by this query index is not used

FROM table1
where ts_match_vq(to_tsvector('english', column1),to_tsquery('searchedText'))
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.310826 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO