Last active
December 20, 2015 11:39
-
-
Save luckyruby/6125324 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| reznet_production=> explain analyze SELECT "reservations".* FROM "reservations" WHERE (lower(last_name) like 'lin%') ORDER BY updated_at desc LIMIT 20 OFFSET 0; | |
| QUERY PLAN | |
| ----------------------------------------------------------------------------------------------------------------------------------- | |
| Limit (cost=159102.95..159103.00 rows=20 width=1053) (actual time=1220.328..1220.336 rows=20 loops=1) | |
| -> Sort (cost=159102.95..159116.11 rows=5263 width=1053) (actual time=1220.326..1220.331 rows=20 loops=1) | |
| Sort Key: updated_at | |
| Sort Method: top-N heapsort Memory: 51kB | |
| -> Seq Scan on reservations (cost=0.00..158962.90 rows=5263 width=1053) (actual time=0.997..1216.519 rows=2266 loops=1) | |
| Filter: (lower((last_name)::text) ~~ 'lin%'::text) | |
| Total runtime: 1220.433 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| reznet_production=> explain analyze SELECT "reservations".* FROM "reservations" WHERE (lower(last_name) like 'lin%') LIMIT 20 OFFSET 0; QUERY PLAN | |
| ------------------------------------------------------------------------------------------------------------------------- | |
| Limit (cost=0.00..604.08 rows=20 width=1053) (actual time=0.988..11.149 rows=20 loops=1) | |
| -> Seq Scan on reservations (cost=0.00..158962.90 rows=5263 width=1053) (actual time=0.987..11.144 rows=20 loops=1) | |
| Filter: (lower((last_name)::text) ~~ 'lin%'::text) | |
| Total runtime: 11.217 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment