Skip to content

Instantly share code, notes, and snippets.

@ereshzealous
Created September 7, 2021 09:29
Show Gist options
  • Save ereshzealous/ae6ca0b2bef2dc481606a545b060061b to your computer and use it in GitHub Desktop.
Save ereshzealous/ae6ca0b2bef2dc481606a545b060061b to your computer and use it in GitHub Desktop.
explain analyze select * from user_details where details @> '{"info" : {"crop" : "Corn", "farmSize": "2-3"}}' limit 50;
QUERY PLAN |
---------------------------------------------------------------------------------------------------------------------|
Limit (cost=0.00..3501.85 rows=50 width=426) (actual time=0.016..0.587 rows=50 loops=1) |
-> Seq Scan on user_details (cost=0.00..262639.00 rows=3750 width=426) (actual time=0.015..0.581 rows=50 loops=1)|
Filter: (details @> '{"info": {"crop": "Corn", "farmSize": "2-3"}}'::jsonb) |
Rows Removed by Filter: 1046 |
Planning Time: 0.058 ms |
Execution Time: 0.613 ms |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment