Skip to content

Instantly share code, notes, and snippets.

@alekseyl
Created November 24, 2017 12:47
Show Gist options
  • Save alekseyl/ca90a0f096ab4dd02ef5e79010d95a81 to your computer and use it in GitHub Desktop.
Save alekseyl/ca90a0f096ab4dd02ef5e79010d95a81 to your computer and use it in GitHub Desktop.
EXPLAIN ANALYZE SELECT * FROM words WHERE word LIKE 'o%' LIMIT 10;
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=0.42..36.23 rows=10 width=440) (actual time=1.343..1.473 rows=10 loops=1)
-> Index Scan using index_words_word on words (cost=0.42..30333.13 rows=8471 width=440) (actual time=1.341..1.468 rows=10 loops=1)
Index Cond: (((word)::text ~>=~ 'o'::text) AND ((word)::text ~<~ 'p'::text))
Filter: ((word)::text ~~ 'o%'::text)
Planning time: 0.207 ms
Execution time: 1.521 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment