explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jIkw

Settings
# exclusive inclusive rows x rows loops node
1. 0.046 11,720.440 ↓ 0.0 0 1

HashAggregate (cost=10,168.23..10,212.43 rows=4,420 width=447) (actual time=11,720.440..11,720.440 rows=0 loops=1)

  • Group Key: "NonProfitOrganization".id
2. 11,298.932 11,720.394 ↓ 0.0 0 1

Hash Right Join (cost=3,179.45..10,157.18 rows=4,420 width=447) (actual time=11,720.394..11,720.394 rows=0 loops=1)

  • Hash Cond: (locations."npoId" = "NonProfitOrganization".id)
  • Filter: ((npo_make_tsvector("NonProfitOrganization".*) @@ plainto_tsquery('group'::text)) OR ((locations."zipCode")::text = 'test'::text) OR (("locations->city".name)::text = 'test'::text) OR (("locations->city->state".name)::text = 'test'::text) OR (("locations->city->state".code)::text = 'test'::text))
  • Rows Removed by Filter: 130752
3. 93.662 323.218 ↑ 1.0 130,750 1

Hash Left Join (cost=914.30..7,544.85 rows=131,262 width=32) (actual time=24.151..323.218 rows=130,750 loops=1)

  • Hash Cond: ("locations->city"."stateId" = "locations->city->state".id)
4. 153.723 229.485 ↑ 1.0 130,750 1

Hash Left Join (cost=911.98..7,173.20 rows=131,262 width=23) (actual time=24.069..229.485 rows=130,750 loops=1)

  • Hash Cond: (locations."cityId" = "locations->city".id)
5. 51.882 51.882 ↑ 1.0 130,750 1

Seq Scan on "npoLocations" locations (cost=0.00..5,916.62 rows=131,262 width=14) (actual time=0.013..51.882 rows=130,750 loops=1)

6. 13.630 23.880 ↑ 1.0 29,910 1

Hash (cost=538.10..538.10 rows=29,910 width=17) (actual time=23.880..23.880 rows=29,910 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1703kB
7. 10.250 10.250 ↑ 1.0 29,910 1

Seq Scan on cities "locations->city" (cost=0.00..538.10 rows=29,910 width=17) (actual time=0.011..10.250 rows=29,910 loops=1)

8. 0.035 0.071 ↑ 1.0 59 1

Hash (cost=1.59..1.59 rows=59 width=17) (actual time=0.070..0.071 rows=59 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
9. 0.036 0.036 ↑ 1.0 59 1

Seq Scan on states "locations->city->state" (cost=0.00..1.59 rows=59 width=17) (actual time=0.015..0.036 rows=59 loops=1)

10. 38.004 98.244 ↑ 1.0 26,152 1

Hash (cost=1,932.29..1,932.29 rows=26,629 width=918) (actual time=98.244..98.244 rows=26,152 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 23493kB
11. 60.240 60.240 ↑ 1.0 26,152 1

Seq Scan on "nonProfitOrganizations" "NonProfitOrganization" (cost=0.00..1,932.29 rows=26,629 width=918) (actual time=0.021..60.240 rows=26,152 loops=1)

  • Filter: (NOT "isSuspended")