Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- explain analyze SELECT distinct on (documents.id) documents.* FROM "documents" INNER JOIN "full_text" ON full_text.document_id = documents.id WHERE (to_tsvector('english', full_text.text) @@ plainto_tsquery(E'george bush'));
- QUERY PLAN
- ------------------------------------------------------------------------------------------------------------------------------------------------------------
- Unique (cost=0.00..22.83 rows=1 width=462) (actual time=82.013..5671.701 rows=19 loops=1)
- -> Nested Loop (cost=0.00..22.83 rows=1 width=462) (actual time=82.008..5671.630 rows=19 loops=1)
- -> Index Scan using index_full_text_on_document_id on full_text (cost=0.00..14.55 rows=1 width=4) (actual time=81.995..5671.347 rows=19 loops=1)
- Filter: (to_tsvector('english'::regconfig, text) @@ plainto_tsquery('george bush'::text))
- -> Index Scan using documents_pkey on documents (cost=0.00..8.27 rows=1 width=462) (actual time=0.008..0.009 rows=1 loops=19)
- Index Cond: (documents.id = full_text.document_id)
- Total runtime: 5671.778 ms
- (7 rows)
Add Comment
Please, Sign In to add comment