Skip to content

Instantly share code, notes, and snippets.

@rueian
Last active January 2, 2020 00:38
Show Gist options
  • Save rueian/3a03a3c67808f739943507c89007e8f9 to your computer and use it in GitHub Desktop.
Save rueian/3a03a3c67808f739943507c89007e8f9 to your computer and use it in GitHub Desktop.
postgres=# explain analyze select * from counters where id like 'ms:149895:%';
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------
Index Scan using counters_pkey on counters (cost=0.56..8.58 rows=49 width=36) (actual time=0.015..0.023 rows=10 loops=1)
Index Cond: ((id >= 'ms:149895:'::text) AND (id < 'ms:149895;'::text))
Filter: (id ~~ 'ms:149895:%'::text)
Planning Time: 0.146 ms
Execution Time: 0.036 ms
(5 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment