explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ECZu

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 3,743.216 ↑ 1.0 10 1

Limit (cost=1,110,581.85..1,110,581.98 rows=10 width=204) (actual time=3,743.006..3,743.216 rows=10 loops=1)

2. 0.016 3,743.208 ↑ 2,065,533.1 10 1

Merge Join (cost=1,110,581.85..1,380,786.56 rows=20,655,331 width=204) (actual time=3,743.005..3,743.208 rows=10 loops=1)

3. 9.455 50.461 ↑ 2,473.1 10 1

Sort (cost=5,528.13..5,589.96 rows=24,731 width=140) (actual time=50.459..50.461 rows=10 loops=1)

  • Sort Key: vdaim.cd_issue_id
  • Sort Method: quicksort Memory: 4298kB
4. 2.957 41.006 ↑ 1.0 24,233 1

Subquery Scan on vdaim (cost=7.89..3,723.51 rows=24,731 width=140) (actual time=0.066..41.006 rows=24,233 loops=1)

5. 1.542 38.049 ↑ 1.0 24,233 1

Append (cost=7.89..3,476.2 rows=24,731 width=404) (actual time=0.066..38.049 rows=24,233 loops=1)

6. 8.025 36.423 ↑ 1.0 24,181 1

Subquery Scan on *SELECT* 1 (cost=7.89..3,341.57 rows=24,684 width=223) (actual time=0.065..36.423 rows=24,181 loops=1)

7. 4.830 28.398 ↑ 1.0 24,181 1

Hash Join (cost=7.89..3,033.02 rows=24,684 width=219) (actual time=0.06..28.398 rows=24,181 loops=1)

8. 23.530 23.530 ↑ 1.0 24,205 1

Seq Scan on dim_anag_issue d (cost=0..2,713.16 rows=24,773 width=219) (actual time=0.015..23.53 rows=24,205 loops=1)

  • Filter: ((ds_issue_descr ~~ '%M%'::text) AND (cd_issue_status_code = ANY ('{1,2,3,4,5,6,7}'::integer[])) AND ((cd_issue_status_code <> 1) OR (dt_max_incident_date >= ((now())::date - '90 days'::interval))))
9. 0.014 0.038 ↑ 1.3 133 1

Hash (cost=5.73..5.73 rows=173 width=4) (actual time=0.038..0.038 rows=133 loops=1)

10. 0.024 0.024 ↑ 1.3 133 1

Seq Scan on tb_issue_wb t (cost=0..5.73 rows=173 width=4) (actual time=0.004..0.024 rows=133 loops=1)

11. 0.009 0.084 ↓ 1.1 52 1

Subquery Scan on *SELECT* 2 (cost=0..10.98 rows=47 width=300) (actual time=0.033..0.084 rows=52 loops=1)

12. 0.075 0.075 ↓ 1.1 52 1

Seq Scan on tb_issue_wb ti (cost=0..10.51 rows=47 width=163) (actual time=0.031..0.075 rows=52 loops=1)

  • Filter: ((ds_issue_descr ~~ '%M%'::text) AND (cd_issue_status_code = ANY ('{1,2,3,4,5,6,7}'::integer[])) AND ((cd_issue_status_code <> 1) OR (now() >= ((now())::date - '90 days'::interval))))
13. 0.129 3,692.731 ↑ 2,037.1 82 1

Aggregate (cost=1,105,053.71..1,166,493.46 rows=167,040 width=36) (actual time=3,692.524..3,692.731 rows=82 loops=1)

14. 1,407.894 3,692.602 ↑ 16,766.0 472 1

Sort (cost=1,105,053.71..1,124,837.63 rows=7,913,566 width=8) (actual time=3,692.498..3,692.602 rows=472 loops=1)

  • Sort Key: (CASE WHEN (tiw.cd_incident_id IS NOT NULL) THEN tiw.cd_issue_id ELSE fi.cd_issue_id END)
  • Sort Method: quicksort Memory: 567557kB
15. 1,418.653 2,284.708 ↑ 1.0 7,913,566 1

Hash Join (cost=2..198,321.42 rows=7,913,566 width=8) (actual time=0.085..2,284.708 rows=7,913,566 loops=1)

16. 866.018 866.018 ↑ 1.0 7,913,566 1

Seq Scan on ft_issue fi (cost=0..138,967.66 rows=7,913,566 width=12) (actual time=0.037..866.018 rows=7,913,566 loops=1)

17. 0.011 0.037 ↓ 1.4 58 1

Hash (cost=1.4..1.4 rows=40 width=12) (actual time=0.037..0.037 rows=58 loops=1)

18. 0.026 0.026 ↓ 1.4 58 1

Seq Scan on tb_incident_wb tiw (cost=0..1.4 rows=40 width=12) (actual time=0.019..0.026 rows=58 loops=1)