Skip to content

Instantly share code, notes, and snippets.

@sargun
Created March 19, 2014 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sargun/9653801 to your computer and use it in GitHub Desktop.
Save sargun/9653801 to your computer and use it in GitHub Desktop.
avocado=# EXPLAIN SELECT "templates".id FROM "templates" WHERE (to_tsvector('english', "templates"."source"::text) @@ plainto_tsquery('english', 'dimension'::text));
QUERY PLAN
--------------------------------------------------------------------------------
Seq Scan on templates (cost=0.00..39506.12 rows=15139 width=4)
Filter: (to_tsvector('english'::regconfig, source) @@ '''dimens'''::tsquery)
(2 rows)
avocado=# \d+ templates
Table "public.templates"
Column | Type | Modifiers | Storage | Stats target | Description
----------------------+-----------------------------+--------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('templates_id_seq'::regclass) | plain | |
name | character varying(255) | | extended | |
source | text | | extended | |
created_at | timestamp without time zone | not null | plain | |
updated_at | timestamp without time zone | not null | plain | |
version | integer | default 1 | plain | |
updated_by | integer | | plain | |
type | character varying(255) | | extended | |
created_by_id | integer | | plain | |
report_id | integer | | plain | |
source_data_store_id | integer | | plain | |
Indexes:
"templates_pkey" PRIMARY KEY, btree (id)
"index_gin_templates_on_source" gin (to_tsvector('english'::regconfig, source))
Has OIDs: no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment