explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hFJY : Count Query

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

Limit (cost=132,094,312.04..132,094,312.05 rows=1 width=8) (never executed)

2. 0.000 0.000 ↓ 0.0

Aggregate (cost=132,094,312.04..132,094,312.05 rows=1 width=8) (never executed)

3. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,299,508.75..132,057,172.05 rows=14,855,998 width=8) (never executed)

4. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,299,348.01..131,430,645.21 rows=14,701,727 width=12) (never executed)

5. 0.000 0.000 ↓ 0.0

Seq Scan on t644_adobe_product_to_sales_team_assignment__cdim aptsta (cost=0..4,795,136.55 rows=1,269,628 width=8) (never executed)

  • Filter: ((start_stamp >= '1585745190000'::bigint) AND (start_stamp <= '1592570790000'::bigint) AND (start_stamp >= '1585745190000'::bigint) AND (start_stamp <= '1592570790000'::bigint) AND ((end_stamp = '32503680000000'::bigint) OR (end_stamp <= '1592570790000'::bigint)) AND ((end_stamp = '32503680000000'::bigint) OR (end_stamp <= '1592570790000'::bigint)) AND (c5755_outlook_product_group__c = ANY ('{JOURNEY,ASSETS,BIZIBLE,ANALYTICS,IS,AEP,SITES,AAM,RTCDP,FORMS,CAMPAIGN,TARGET,MARKETO,MAGENTO,CJA,"PREMIER SUPPORT"}'::text[])))
6. 0.000 0.000 ↓ 0.0

Hash (cost=10,245,837.77..10,245,837.77 rows=3,078,339 width=12) (never executed)

7. 0.000 0.000 ↓ 0.0

Gather (cost=9,841,927.66..10,245,837.77 rows=3,078,339 width=12) (never executed)

  • Workers Planned: 2
8. 0.000 0.000 ↓ 0.0

Merge Join (cost=9,840,927.66..9,937,003.87 rows=1,282,641 width=12) (never executed)

9. 0.000 0.000 ↓ 0.0

Sort (cost=9,475,807.09..9,514,059.02 rows=15,300,775 width=16) (never executed)

  • Sort Key: o.c7939_accountid
10. 0.000 0.000 ↓ 0.0

Seq Scan on t872_oppdim o (cost=0..7,126,904.35 rows=15,300,775 width=16) (never executed)

  • Filter: ((NOT c7841_isclosed) OR (c7841_isclosed AND c7842_iswon))
11. 0.000 0.000 ↓ 0.0

Materialize (cost=365,113.79..365,798.41 rows=136,924 width=4) (never executed)

12. 0.000 0.000 ↓ 0.0

Sort (cost=365,113.79..365,456.1 rows=136,924 width=4) (never executed)

  • Sort Key: a.sid
13. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on t646_accountdim a (cost=4,778.54..351,559.61 rows=136,924 width=4) (never executed)

  • Filter: ((end_stamp = '32503680000000'::bigint) OR (end_stamp <= '1592570790000'::bigint))
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on t646_accountdim_startstampsid (cost=0..4,744.31 rows=179,975 width=0) (never executed)

  • Index Cond: ((start_stamp >= '1585745190000'::bigint) AND (start_stamp <= '1592570790000'::bigint))
15.          

SubPlan (for Hash Join)

16. 0.000 0.000 ↓ 0.0

Limit (cost=0.56..7.2 rows=1 width=8) (never executed)

17. 0.000 0.000 ↓ 0.0

Index Scan using idx_598_t872_oppdim_sid_end_stamp_start_stamp_null on t872_oppdim oppdim (cost=0.56..246.14 rows=37 width=8) (never executed)

  • Index Cond: ((sid = aptsta.c5717_opportunity__c) AND (start_stamp >= '1585745190000'::bigint) AND (start_stamp <= '1592570790000'::bigint))
  • Filter: (((NOT c7841_isclosed) OR (c7841_isclosed AND c7842_iswon)) AND ((end_stamp = '32503680000000'::bigint) OR (end_stamp <= '1592570790000'::bigint)))
18. 0.000 0.000 ↓ 0.0

Hash (cost=138.31..138.31 rows=1,794 width=4) (never executed)

19. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_t123_adobe_role__cdim_sid_end_stamp_start_stamp on t123_adobe_role__cdim aptstarf2 (cost=0.28..138.31 rows=1,794 width=4) (never executed)

  • Index Cond: ((end_stamp >= '1591015590000'::bigint) AND (start_stamp <= '1591015590000'::bigint))