Skip to content

Instantly share code, notes, and snippets.

@teburd
Created May 10, 2013 17:21
Show Gist options
  • Save teburd/5555917 to your computer and use it in GitHub Desktop.
Save teburd/5555917 to your computer and use it in GitHub Desktop.
No Rank, Order, or Limit
drake=# explain analyze select id from vertices where name_fts @@ plainto_tsquery('school') or description_fts @@ plainto_tsquery('school'); QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on vertices (cost=76.15..6164.12 rows=4484 width=16) (actual time=3.357..7.751 rows=3824 loops=1)
Recheck Cond: ((name_fts @@ plainto_tsquery('school'::text)) OR (description_fts @@ plainto_tsquery('school'::text)))
-> BitmapOr (cost=76.15..76.15 rows=4521 width=0) (actual time=2.750..2.750 rows=0 loops=1)
-> Bitmap Index Scan on vertices_name_fts_gin_idx (cost=0.00..36.94 rows=2258 width=0) (actual time=1.430..1.430 rows=2307 loops=1)
Index Cond: (name_fts @@ plainto_tsquery('school'::text))
-> Bitmap Index Scan on vertices_description_fts_gin_idx (cost=0.00..36.97 rows=2263 width=0) (actual time=1.318..1.318 rows=2255 loops=1)
Index Cond: (description_fts @@ plainto_tsquery('school'::text))
Total runtime: 8.266 ms
(8 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment