explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NuCA

Settings
# exclusive inclusive rows x rows loops node
1. 0.042 10,767.524 ↓ 0.0 0 1

HashAggregate (cost=9,055.89..9,094.96 rows=3,907 width=447) (actual time=10,767.524..10,767.524 rows=0 loops=1)

  • Group Key: "NonProfitOrganization".id
2. 10,383.702 10,767.482 ↓ 0.0 0 1

Hash Right Join (cost=2,878.88..9,046.12 rows=3,907 width=447) (actual time=10,767.482..10,767.482 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: 116047
3. 85.519 298.005 ↓ 1.0 116,045 1

Hash Left Join (cost=914.30..6,774.40 rows=116,012 width=32) (actual time=17.178..298.005 rows=116,045 loops=1)

  • Hash Cond: ("locations->city"."stateId" = "locations->city->state".id)
4. 145.833 212.441 ↓ 1.0 116,045 1

Hash Left Join (cost=911.98..6,445.67 rows=116,012 width=23) (actual time=17.121..212.441 rows=116,045 loops=1)

  • Hash Cond: (locations."cityId" = "locations->city".id)
5. 49.517 49.517 ↓ 1.0 116,045 1

Seq Scan on "npoLocations" locations (cost=0.00..5,229.12 rows=116,012 width=14) (actual time=0.009..49.517 rows=116,045 loops=1)

6. 9.603 17.091 ↑ 1.0 29,910 1

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

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

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

8. 0.022 0.045 ↑ 1.0 59 1

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

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

10. 33.437 85.775 ↓ 1.0 23,211 1

Hash (cost=1,674.81..1,674.81 rows=23,181 width=918) (actual time=85.775..85.775 rows=23,211 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 20879kB
11. 52.338 52.338 ↓ 1.0 23,211 1

Seq Scan on "nonProfitOrganizations" "NonProfitOrganization" (cost=0.00..1,674.81 rows=23,181 width=918) (actual time=0.017..52.338 rows=23,211 loops=1)

  • Filter: (NOT "isSuspended")
Planning time : 1.146 ms
Execution time : 10,767.739 ms