explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K698

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 4,969.044 ↑ 91.0 4 1

Group (cost=6,259.64..6,261.46 rows=364 width=448) (actual time=4,969.038..4,969.044 rows=4 loops=1)

  • Group Key: "NonProfitOrganization".id
2. 0.021 4,969.035 ↑ 91.0 4 1

Sort (cost=6,259.64..6,260.55 rows=364 width=448) (actual time=4,969.034..4,969.035 rows=4 loops=1)

  • Sort Key: "NonProfitOrganization".id
  • Sort Method: quicksort Memory: 27kB
3. 4,735.962 4,969.014 ↑ 91.0 4 1

Hash Left Join (cost=4,025.82..6,244.15 rows=364 width=448) (actual time=645.255..4,969.014 rows=4 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: 54013
4. 63.500 233.008 ↓ 1.0 54,017 1

Hash Left Join (cost=4,023.49..5,621.65 rows=53,934 width=939) (actual time=72.001..233.008 rows=54,017 loops=1)

  • Hash Cond: (locations."cityId" = "locations->city".id)
5. 49.781 150.717 ↓ 1.0 54,017 1

Hash Left Join (cost=3,111.52..4,568.08 rows=53,934 width=930) (actual time=53.189..150.717 rows=54,017 loops=1)

  • Hash Cond: ("NonProfitOrganization".id = locations."npoId")
6. 47.793 47.793 ↑ 1.0 10,805 1

Seq Scan on "nonProfitOrganizations" "NonProfitOrganization" (cost=0.00..820.52 rows=11,052 width=920) (actual time=0.020..47.793 rows=10,805 loops=1)

  • Filter: (NOT "isSuspended")
7. 25.636 53.143 ↓ 1.0 54,015 1

Hash (cost=2,437.34..2,437.34 rows=53,934 width=14) (actual time=53.143..53.143 rows=54,015 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2939kB
8. 27.507 27.507 ↓ 1.0 54,015 1

Seq Scan on "npoLocations" locations (cost=0.00..2,437.34 rows=53,934 width=14) (actual time=0.007..27.507 rows=54,015 loops=1)

9. 10.887 18.791 ↑ 1.0 29,910 1

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

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

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

11. 0.021 0.044 ↑ 1.0 59 1

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

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