Skip to content

Instantly share code, notes, and snippets.

@ereshzealous
Created September 7, 2021 09:18
Show Gist options
  • Save ereshzealous/5a67de39014cd47f30ec492c1bb1d080 to your computer and use it in GitHub Desktop.
Save ereshzealous/5a67de39014cd47f30ec492c1bb1d080 to your computer and use it in GitHub Desktop.
explain analyze select * from user_details where jsonb_extract_path_text(details,'familyMembers') :: int = 9 limit 50;
QUERY PLAN |
-----------------------------------------------------------------------------------------------------------------------|
Limit (cost=0.00..725.37 rows=50 width=426) (actual time=0.033..26.974 rows=50 loops=1) |
-> Seq Scan on user_details (cost=0.00..272014.00 rows=18750 width=426) (actual time=0.032..26.968 rows=50 loops=1)|
Filter: ((details ->> 'familyMembers'::text) = '9'::text) |
Rows Removed by Filter: 73588 |
Planning Time: 0.212 ms |
Execution Time: 26.997 ms |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment