Skip to content

Instantly share code, notes, and snippets.

@alekseyl
Created November 24, 2017 13:45
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 alekseyl/058d2d875ad7743e5ada7f5eb64d70e4 to your computer and use it in GitHub Desktop.
Save alekseyl/058d2d875ad7743e5ada7f5eb64d70e4 to your computer and use it in GitHub Desktop.
EXPLAIN ANALYZE SELECT * FROM words WHERE word LIKE 'o%' ORDER BY word USING ~<~ LIMIT 10;
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=0.42..36.23 rows=10 width=440) (actual time=0.135..0.189 rows=10 loops=1)
-> Index Scan using index_words_word on words (cost=0.42..30333.13 rows=8471 width=440) (actual time=0.133..0.185 rows=10 loops=1)
Index Cond: (((word)::text ~>=~ 'o'::text) AND ((word)::text ~<~ 'p'::text))
Filter: ((word)::text ~~ 'o%'::text)
Planning time: 0.299 ms
Execution time: 0.216 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment