Skip to content

Instantly share code, notes, and snippets.

@ereshzealous
Created September 7, 2021 09:24
Show Gist options
  • Save ereshzealous/695cbcedddec9da55e582dd236655602 to your computer and use it in GitHub Desktop.
Save ereshzealous/695cbcedddec9da55e582dd236655602 to your computer and use it in GitHub Desktop.
explain analyze select * from user_details where details ->> 'alternateContacts' like '%777%' limit 50;
QUERY PLAN |
-----------------------------------------------------------------------------------------------------------------------|
Limit (cost=0.00..90.67 rows=50 width=426) (actual time=0.594..4.489 rows=50 loops=1) |
-> Seq Scan on user_details (cost=0.00..272014.00 rows=150000 width=426) (actual time=0.592..4.480 rows=50 loops=1)|
Filter: ((details ->> 'alternateContacts'::text) ~~ '%777%'::text) |
Rows Removed by Filter: 4384 |
Planning Time: 0.074 ms |
Execution Time: 4.510 ms |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment