explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pOk9

Settings
# exclusive inclusive rows x rows loops node
1. 46.008 46.111 ↓ 0.0 0 1

Gather (cost=85,726.33..105,017.59 rows=6 width=1,055) (actual time=11.716..46.111 rows=0 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
  • loops=2)
2. 0.075 0.103 ↓ 0.0 0 2 / 2

Hash Semi Join (cost=84,726.33..104,016.99 rows=4 width=1,055) (actual time=0.103..0.103 rows=0 loops=2)

  • Hash Cond: (contract_period.contract_definition_id = u0.id)
3. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash Left Join (cost=84,725.06..102,955.22 rows=403,990 width=1,055) (never executed)

  • Hash Cond: (contract_period.dkr_id = ack_dkr.id)
4. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash Left Join (cost=77,945.80..95,115.48 rows=403,990 width=922) (never executed)

  • Hash Cond: (contract_period.dfk_id = ack_dfk.id)
5. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash Left Join (cost=65,992.81..82,102.01 rows=403,990 width=816) (never executed)

  • Hash Cond: (contract_period.kbk_id = kbk.id)
6. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash Join (cost=54,447.17..69,495.90 rows=403,990 width=624) (never executed)

  • Hash Cond: (contract_period.contract_definition_id = contract_definition.id)
7. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash Left Join (cost=48,432.52..62,420.77 rows=403,990 width=440) (never executed)

  • Hash Cond: (contract_period.kosgu_id = kbk_kosgu.id)
8. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash Left Join (cost=20,419.61..28,935.68 rows=403,990 width=252) (never executed)

  • Hash Cond: (contract_period.dek_id = ack_dek.id)
9. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Seq Scan on contract_period (cost=0.00..4,893.40 rows=403,990 width=86) (never executed)

10. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash (cost=11,189.65..11,189.65 rows=621,805 width=166) (never executed)

11. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Seq Scan on ack_dek (cost=0.00..11,189.65 rows=621,805 width=166) (never executed)

12. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash (cost=18,541.34..18,541.34 rows=625,734 width=188) (never executed)

13. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Seq Scan on kbk_kosgu (cost=0.00..18,541.34 rows=625,734 width=188) (never executed)

14. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash (cost=3,363.12..3,363.12 rows=212,122 width=184) (never executed)

15. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Seq Scan on contract_definition (cost=0.00..3,363.12 rows=212,122 width=184) (never executed)

16. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash (cost=6,935.34..6,935.34 rows=368,824 width=192) (never executed)

17. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Seq Scan on kbk (cost=0.00..6,935.34 rows=368,824 width=192) (never executed)

18. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash (cost=6,376.61..6,376.61 rows=446,111 width=106) (never executed)

19. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Seq Scan on ack_dfk (cost=0.00..6,376.61 rows=446,111 width=106) (never executed)

20. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Hash (cost=3,711.78..3,711.78 rows=245,398 width=133) (never executed)

21. 0.000 0.000 ↓ 0.0 0 / 2

Parallel Seq Scan on ack_dkr (cost=0.00..3,711.78 rows=245,398 width=133) (never executed)

22. 0.001 0.028 ↓ 0.0 0 2 / 2

Hash (cost=1.25..1.25 rows=1 width=4) (actual time=0.028..0.028 rows=0 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
23. 0.027 0.027 ↓ 0.0 0 2 / 2

Nested Loop (cost=0.84..1.25 rows=1 width=4) (actual time=0.027..0.027 rows=0 loops=2)

  • -> Index Scan using contract_definition_info_date_next on contract_definition u0 (cost=0.42..0.58 rows=1 width=8) (actual time=0.027..0.027 rows=0
  • Index Cond: (info_date_next >= '9999-12-31 23:59:59'::timestamp without time zone)
  • Filter: ((contract_id = ANY ('{415853,465614}'::integer[])) AND (date_formatting >= '2019-01-01'::date) AND (date_formatting <= '2019-12-31'::date) AND (info_date <= '9999-12-31 23:59:59'::timestamp without time zone))
24. 0.000 0.000 ↓ 0.0 0 / 2

Index Scan using contract_pkey on contract u1 (cost=0.42..0.66 rows=1 width=4) (never executed)

  • Index Cond: (id = u0.contract_id)
  • Filter: (ent_id = 2,106)
Planning time : 52.353 ms
Execution time : 47.098 ms