1
vote
1answer
966 views

postgres GROUP BY and ORDER BY problem

I have two tables like this: CREATE TABLE cmap5 ( name VARCHAR(2000), lexemes TSQUERY ); and CREATE TABLE IF NOT EXISTS synonyms_all_gin_tsvcolumn ( cid int NOT NULL ...
1
vote
1answer
169 views

Avoiding performance hit from GROUP BY during FULLTEXT search?

Is there any clever way to avoid the performance hit from using group by during fulltext search? SELECT p.topic_id, min(p.post_id) FROM forum_posts AS p WHERE MATCH (p.post_text) AGAINST ('baby ...