Skip to content

Instantly share code, notes, and snippets.

@ereshzealous
Created September 7, 2021 09:25
Show Gist options
  • Save ereshzealous/aa38410063fca0578475316545d94da7 to your computer and use it in GitHub Desktop.
Save ereshzealous/aa38410063fca0578475316545d94da7 to your computer and use it in GitHub Desktop.
explain analyze select * from user_details where to_date(details ->>'dateOfBirth', 'YYYY-MM-DD') = '2000-03-01' limit 50;
QUERY PLAN |
-------------------------------------------------------------------------------------------------------------------------|
Limit (cost=0.00..750.37 rows=50 width=426) (actual time=0.148..1231.418 rows=50 loops=1) |
-> Seq Scan on user_details (cost=0.00..281389.00 rows=18750 width=426) (actual time=0.147..1231.401 rows=50 loops=1)|
Filter: (to_date((details ->> 'dateOfBirth'::text), 'YYYY-MM-DD'::text) = '2000-03-01'::date) |
Rows Removed by Filter: 2123988 |
Planning Time: 0.063 ms |
Execution Time: 1231.454 ms |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment