explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 34FD : Optimization for: plan #acvf9

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

XN Hash Join DS_BCAST_INNER (cost=1,019.05..89,601,784.41 rows=3 width=158) (actual rows= loops=)

  • Hash Cond: ((COALESCE("outer".parentid, "outer".parentid))::text = ("inner".id)::text)
2. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_BCAST_INNER (cost=470.47..85,121,127.44 rows=8,669 width=157) (actual rows= loops=)

  • Hash Cond: (("outer".parentid)::text = ("inner".id)::text)
3. 0.000 0.000 ↓ 0.0

XN Seq Scan on account (cost=0.00..548.56 rows=8,669 width=90) (actual rows= loops=)

  • Filter: ((leafly_store_id__c IS NOT NULL) AND ((brand_or_retail__c)::text = 'Retail'::text) AND (("type")::text <> 'Master'::text) AND (("type")::text <> 'Territory'::text))
4. 0.000 0.000 ↓ 0.0

XN Hash (cost=470.19..470.19 rows=112 width=67) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

XN Seq Scan on account (cost=0.00..470.19 rows=112 width=67) (actual rows= loops=)

  • Filter: ((("type")::text = 'Territory'::text) AND ((brand_or_retail__c)::text = 'Retail'::text))
6. 0.000 0.000 ↓ 0.0

XN Hash (cost=548.56..548.56 rows=8 width=45) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

XN Seq Scan on account (cost=0.00..548.56 rows=8 width=45) (actual rows= loops=)

  • Filter: ((("type")::text = 'Master'::text) AND ((level__c)::text = 'Key Account'::text) AND ((brand_or_retail__c)::text = 'Retail'::text) AND (id IS NOT NULL))