explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hwhi

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 7,986.241 ↓ 0.0 0 1

HashAggregate (cost=7,158.55..7,188.11 rows=2,956 width=448) (actual time=7,986.241..7,986.241 rows=0 loops=1)

  • Group Key: "NonProfitOrganization".id
2. 7,694.344 7,986.219 ↓ 0.0 0 1

Hash Right Join (cost=2,475.14..7,151.16 rows=2,956 width=448) (actual time=7,986.219..7,986.219 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: 87928
3. 63.151 221.461 ↓ 1.0 87,925 1

Hash Left Join (cost=914.30..5,357.32 rows=87,766 width=32) (actual time=17.904..221.461 rows=87,925 loops=1)

  • Hash Cond: ("locations->city"."stateId" = "locations->city->state".id)
4. 105.150 158.239 ↓ 1.0 87,925 1

Hash Left Join (cost=911.98..5,108.05 rows=87,766 width=23) (actual time=17.815..158.239 rows=87,925 loops=1)

  • Hash Cond: (locations."cityId" = "locations->city".id)
5. 35.308 35.308 ↓ 1.0 87,925 1

Seq Scan on "npoLocations" locations (cost=0.00..3,965.66 rows=87,766 width=14) (actual time=0.011..35.308 rows=87,925 loops=1)

6. 10.155 17.781 ↑ 1.0 29,910 1

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

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

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

8. 0.039 0.071 ↑ 1.0 59 1

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

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

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

10. 29.697 70.414 ↑ 1.0 17,588 1

Hash (cost=1,334.26..1,334.26 rows=18,126 width=920) (actual time=70.414..70.414 rows=17,588 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 15910kB
11. 40.717 40.717 ↑ 1.0 17,588 1

Seq Scan on "nonProfitOrganizations" "NonProfitOrganization" (cost=0.00..1,334.26 rows=18,126 width=920) (actual time=0.020..40.717 rows=17,588 loops=1)

  • Filter: (NOT "isSuspended")