explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WU2D

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 2,720.210 ↑ 94.5 2 1

Group (cost=3,756.39..3,757.34 rows=189 width=453) (actual time=2,720.205..2,720.210 rows=2 loops=1)

  • Group Key: "NonProfitOrganization".id
2. 0.012 2,720.200 ↑ 94.5 2 1

Sort (cost=3,756.39..3,756.87 rows=189 width=453) (actual time=2,720.199..2,720.200 rows=2 loops=1)

  • Sort Key: "NonProfitOrganization".id
  • Sort Method: quicksort Memory: 26kB
3. 2,592.890 2,720.188 ↑ 94.5 2 1

Hash Left Join (cost=2,561.06..3,749.25 rows=189 width=453) (actual time=617.849..2,720.188 rows=2 loops=1)

  • Hash Cond: ("locations->city"."stateId" = "locations->city->state".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: 28184
4. 33.932 127.217 ↓ 1.0 28,186 1

Hash Left Join (cost=2,558.73..3,423.97 rows=28,078 width=949) (actual time=39.946..127.217 rows=28,186 loops=1)

  • Hash Cond: (locations."cityId" = "locations->city".id)
5. 27.245 72.837 ↓ 1.0 28,186 1

Hash Left Join (cost=1,646.76..2,438.28 rows=28,078 width=940) (actual time=19.474..72.837 rows=28,186 loops=1)

  • Hash Cond: ("NonProfitOrganization".id = locations."npoId")
6. 26.153 26.153 ↑ 1.0 5,638 1

Seq Scan on "nonProfitOrganizations" "NonProfitOrganization" (cost=0.00..460.93 rows=5,693 width=930) (actual time=0.017..26.153 rows=5,638 loops=1)

  • Filter: (NOT "isSuspended")
7. 9.526 19.439 ↓ 1.0 28,185 1

Hash (cost=1,295.78..1,295.78 rows=28,078 width=14) (actual time=19.439..19.439 rows=28,185 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1523kB
8. 9.913 9.913 ↓ 1.0 28,185 1

Seq Scan on "npoLocations" locations (cost=0.00..1,295.78 rows=28,078 width=14) (actual time=0.006..9.913 rows=28,185 loops=1)

9. 11.665 20.448 ↑ 1.0 29,910 1

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

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

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

11. 0.045 0.081 ↑ 1.0 59 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
12. 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.014..0.036 rows=59 loops=1)