explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K6OM : Optimization for: plan #tAvV

Settings

Optimization path:

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

Sort (cost=13,618,248.16..13,671,298.71 rows=21,220,220 width=180) (actual rows= loops=)

  • Sort Key: rep_h."EXPENSE_REPORT_PK", rep_h."MODIFIED_DATE
2. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=4,216,872.87..5,378,512.75 rows=21,220,220 width=180) (actual rows= loops=)

  • Merge Cond: (rep_h."DETAIL_PK" = com."DETAIL_PK")
  • Join Filter: (rep_h."DETAIL_PK" > '0'::numeric)
3. 0.000 0.000 ↓ 0.0

Sort (cost=2,010,105.49..2,021,336.23 rows=4,492,296 width=158) (actual rows= loops=)

  • Sort Key: rep_h."DETAIL_PK
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=26,709.83..807,414.76 rows=4,492,296 width=158) (actual rows= loops=)

  • Hash Cond: (rep_h."MODIFIED_BY" = run."RUN_PROCESSES_PK")
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=26,706.12..773,494.22 rows=4,492,296 width=175) (actual rows= loops=)

  • Hash Cond: (rep_h."MODIFIED_BY" = emp."EMP_PK")
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=431.17..481,481.20 rows=4,492,296 width=159) (actual rows= loops=)

  • Hash Cond: (rep_h."GENERIC_LIST_PK" = gen."GENERIC_LIST_PK")
7. 0.000 0.000 ↓ 0.0

Seq Scan on "EXPENSE_REPORT_HIST" rep_h (cost=0.00..419,280.96 rows=4,492,296 width=174) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=266.63..266.63 rows=13,163 width=23) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on "GENERIC_LIST" gen (cost=0.00..266.63 rows=13,163 width=23) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash (cost=19,492.20..19,492.20 rows=369,420 width=22) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on "EMPLOYEES" emp (cost=0.00..19,492.20 rows=369,420 width=22) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=2.76..2.76 rows=76 width=20) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on "RUN_PROCESSES" run (cost=0.00..2.76 rows=76 width=20) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Materialize (cost=2,206,767.39..2,257,001.08 rows=10,046,739 width=61) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Sort (cost=2,206,767.39..2,231,884.23 rows=10,046,739 width=61) (actual rows= loops=)

  • Sort Key: com."DETAIL_PK