explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ViOQ

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

Hash Right Join (cost=35.86..51.80 rows=3 width=144) (actual rows= loops=)

  • Hash Cond: (t15_opportunityforecastcategorypicklistdim.sid = cte0.c7)
2. 0.000 0.000 ↓ 0.0

Seq Scan on t15_opportunityforecastcategorypicklistdim (cost=0.00..14.30 rows=430 width=36) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Hash (cost=0.06..0.06 rows=3 width=116) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Seq Scan on t16_opportunitystagenamepicklistdim t16_opportunitystagenamepicklistdim_1 (cost=0.00..15.38 rows=2 width=4) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Seq Scan on t16_opportunitystagenamepicklistdim (cost=0.00..15.38 rows=2 width=4) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=4.88..5.01 rows=3 width=120) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

CTE Scan on bucketec cte0 (cost=0.00..0.06 rows=3 width=116) (actual rows= loops=)

  • Group Key: (CASE WHEN (t13_opp_fact_1.sid IS NULL) THEN 'newBucket'::text WHEN (t13_opp_fact_1.c118_opportunity_close_date > 20171231) THEN 'pulledInBucket'::text WHEN (t13_opp_fact_1.c118_opportunity_close_date < 20171001) THEN 'pushedInBucket'::text WHEN ((t13_opp_fact_1.c118_opportunity_close_date >= 20,171,001) AND (t13_opp_fact_1.c118_opportunity_close_date <= 20,171,231) AND (t13_opp_fact_1.c114_opportunity_ownerid = 2)) THEN 'otherBucket'::text ELSE 'gainedOwnershipBucket'::text END), (CASE WHEN (hashed SubPlan 3) THEN 'won'::text WHEN (hashed SubPlan 4) THEN 'lost'::text ELSE 'newOpen'::text END), t13_opp_fact.c116_opportunity_forecastcategory
  • Filter: (correlated_value = 'wonStage'::text)
  • Filter: (correlated_value = 'lostStage'::text)
8. 0.000 0.000 ↓ 0.0

Sort (cost=4.79..4.80 rows=3 width=80) (actual rows= loops=)

  • Sort Key: (CASE WHEN (t13_opp_fact_1.sid IS NULL) THEN 'newBucket'::text WHEN (t13_opp_fact_1.c118_opportunity_close_date > 20171231) THEN 'pulledInBucket'::text WHEN (t13_opp_fact_1.c118_opportunity_close_date < 20171001) THEN 'pushedInBucket'::text WHEN ((t13_opp_fact_1.c118_opportunity_close_date >= 20,171,001) AND (t13_opp_fact_1.c118_opportunity_close_date <= 20,171,231) AND (t13_opp_fact_1.c114_opportunity_ownerid = 2)) THEN 'otherBucket'::text ELSE 'gainedOwnershipBucket'::text END), (CASE WHEN (hashed SubPlan 3) THEN 'won'::text WHEN (hashed SubPlan 4) THEN 'lost'::text ELSE 'newOpen'::text END), t13_opp_fact.c116_opportunity_forecastcategory
9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2.15..4.77 rows=3 width=80) (actual rows= loops=)

  • Hash Cond: ((t13_opp_fact.sid = t13_opp_fact_1.sid) AND (t13_opp_fact.sid = t13_opp_fact_1.sid))
  • Filter: ((t13_opp_fact_1.sid IS NULL) OR (t13_opp_fact_1.c118_opportunity_close_date < 20171001) OR (t13_opp_fact_1.c118_opportunity_close_date > 20171231) OR (t13_opp_fact_1.c114_opportunity_ownerid <> 2))
10. 0.000 0.000 ↓ 0.0

Seq Scan on t13_opp_fact (cost=0.00..2.12 rows=21 width=20) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=1.75..1.75 rows=21 width=12) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

CTE Scan on picklist_1 cte0_2 (cost=0.00..0.04 rows=2 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

CTE Scan on picklist_0 cte0_1 (cost=0.00..0.04 rows=2 width=4) (actual rows= loops=)

  • Filter: ((NOT deleted) AND (start_stamp <= '1514764799999'::bigint) AND (end_stamp > '1514764799999'::bigint) AND (c118_opportunity_close_date >= 20,171,001) AND (c118_opportunity_close_date <= 20,171,231) AND (c114_opportunity_ownerid = 2))
14. 0.000 0.000 ↓ 0.0

Seq Scan on t13_opp_fact t13_opp_fact_1 (cost=0.00..1.75 rows=21 width=12) (actual rows= loops=)

  • Filter: ((NOT deleted) AND (start_stamp <= '1506816000000'::bigint) AND (end_stamp > '1506816000000'::bigint))