explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZD4X

Settings
# exclusive inclusive rows x rows loops node
1. 3.564 7,965.606 ↓ 126.0 126 1

Nested Loop Semi Join (cost=35.43..2,182.54 rows=1 width=182) (actual time=6,474.064..7,965.606 rows=126 loops=1)

  • Join Filter: (((zp.man)::text = (ads.man)::text) AND ((zp.ak)::text = (ads.ak)::text) AND ((zp.pnr)::text = (ads.pnr)::text))
2. 2.606 7,911.894 ↓ 8,358.0 8,358 1

Nested Loop (cost=35.14..2,181.99 rows=1 width=153) (actual time=1.160..7,911.894 rows=8,358 loops=1)

3. 9.046 7,875.740 ↓ 8,387.0 8,387 1

Nested Loop Left Join (cost=34.86..2,181.66 rows=1 width=164) (actual time=1.139..7,875.740 rows=8,387 loops=1)

4. 5.647 7,841.578 ↓ 8,372.0 8,372 1

Nested Loop Left Join (cost=34.58..2,181.31 rows=1 width=130) (actual time=1.130..7,841.578 rows=8,372 loops=1)

5. 13.562 6,270.741 ↓ 8,370.0 8,370 1

Nested Loop Left Join (cost=34.15..2,178.93 rows=1 width=118) (actual time=1.017..6,270.741 rows=8,370 loops=1)

6. 5.076 6,215.329 ↓ 8,370.0 8,370 1

Nested Loop Left Join (cost=33.59..2,176.22 rows=1 width=116) (actual time=0.955..6,215.329 rows=8,370 loops=1)

7. 4.121 135.217 ↓ 3,828.0 3,828 1

Nested Loop (cost=33.03..2,173.54 rows=1 width=86) (actual time=0.621..135.217 rows=3,828 loops=1)

  • Join Filter: (((zp.man)::text = (v.man)::text) AND ((zp.ak)::text = (v.ak)::text) AND ((zp.pnr)::text = (v.pnr)::text))
8. 5.988 81.072 ↓ 481.0 3,848 1

Nested Loop (cost=32.61..2,168.97 rows=8 width=69) (actual time=0.585..81.072 rows=3,848 loops=1)

9. 6.798 40.443 ↓ 18.9 3,849 1

Merge Join (cost=32.19..1,957.39 rows=204 width=41) (actual time=0.549..40.443 rows=3,849 loops=1)

  • Merge Cond: (((zp.man)::text = (u.man)::text) AND ((zp.ak)::text = (u.ak)::text) AND ((zp.pnr)::text = (u.pnr)::text))
10. 20.835 20.835 ↑ 1.0 6,357 1

Index Scan using pk_zeitperson on zeitperson zp (cost=0.29..1,069.34 rows=6,449 width=17) (actual time=0.025..20.835 rows=6,357 loops=1)

  • Index Cond: (zeitab <= '2020-05-14'::date)
  • Filter: ((zeitbis >= '2020-05-14'::date) AND ((zeitkzaz)::text = 'A'::text))
  • Rows Removed by Filter: 14282
11. 12.810 12.810 ↓ 1.0 5,911 1

Index Scan using ermusers on users u (cost=0.29..803.83 rows=5,842 width=24) (actual time=0.017..12.810 rows=5,911 loops=1)

  • Index Cond: ((u_ab <= '2020-05-14'::date) AND (u_bis >= '2020-05-14'::date))
  • Filter: ((ug_id)::text = 'ERM'::text)
  • Rows Removed by Filter: 395
12. 34.641 34.641 ↑ 1.0 1 3,849

Index Scan using pk_pgrdat on pgrdat p (cost=0.42..1.03 rows=1 width=28) (actual time=0.009..0.009 rows=1 loops=3,849)

  • Index Cond: (((pnr)::text = (zp.pnr)::text) AND ((man)::text = (zp.man)::text) AND ((ak)::text = (zp.ak)::text) AND (pst_ab <= '2020-05-14'::date))
  • Filter: (pst_bis >= '2020-05-14'::date)
  • Rows Removed by Filter: 2
13. 50.024 50.024 ↑ 1.0 1 3,848

Index Scan using ixr_149 on vertrag v (cost=0.42..0.55 rows=1 width=17) (actual time=0.012..0.013 rows=1 loops=3,848)

  • Index Cond: (((pnr)::text = (p.pnr)::text) AND ((man)::text = (p.man)::text) AND ((ak)::text = (p.ak)::text))
  • Filter: ((ver_ab <= '2020-05-31'::date) AND (ver_bis >= '2020-05-01'::date) AND (verbegin <= '2020-05-14'::date) AND ((verende >= '2020-05-14'::date) OR (verende IS NULL)) AND ((hauptv)::text = '1'::text))
  • Rows Removed by Filter: 4
14. 6,075.036 6,075.036 ↓ 2.0 2 3,828

Index Scan using pk_ist_buchung on ist_buchung b (cost=0.56..2.67 rows=1 width=47) (actual time=1.584..1.587 rows=2 loops=3,828)

  • Index Cond: (((zp.man)::text = (man)::text) AND ((zp.ak)::text = (fnr)::text) AND ((zp.pnr)::text = (pnr)::text) AND (zp.vertnr = vertnr))
  • Filter: ((ist_tag = '2020-05-14'::date) OR (ist_tag = '2020-05-13'::date) OR (ist_tag IS NULL))
  • Rows Removed by Filter: 1188
15. 41.850 41.850 ↑ 1.0 1 8,370

Index Scan using zie1abrvortrag on abr_vortrag a (cost=0.56..2.70 rows=1 width=19) (actual time=0.005..0.005 rows=1 loops=8,370)

  • Index Cond: ((abr_tag = '2020-05-14'::date) AND ((zp.man)::text = (man)::text) AND ((zp.ak)::text = (fnr)::text) AND ((zp.pnr)::text = (pnr)::text) AND (zp.vertnr = vertnr))
16. 1,565.190 1,565.190 ↓ 0.0 0 8,370

Index Scan using ixr_262 on zeitenkal zk (cost=0.43..2.36 rows=1 width=25) (actual time=0.172..0.187 rows=0 loops=8,370)

  • Index Cond: (((zp.pnr)::text = (pnr)::text) AND ((zp.man)::text = (man)::text) AND ((zp.ak)::text = (ak)::text))
  • Filter: ((zk_vondat <= '2020-05-14'::date) AND ((zk_bisdat >= '2020-05-14'::date) OR (zk_bisdat IS NULL)) AND ((zk_planan)::text = 'I'::text))
  • Rows Removed by Filter: 164
17. 25.116 25.116 ↑ 1.0 1 8,372

Index Scan using ixr_951 on komm_dat k (cost=0.28..0.34 rows=1 width=48) (actual time=0.003..0.003 rows=1 loops=8,372)

  • Index Cond: (((pnr)::text = (u.pnr)::text) AND ((man)::text = (u.man)::text) AND ((ak)::text = (u.ak)::text))
  • Filter: ((km_ab <= '2020-05-14'::date) AND (km_bis >= '2020-05-14'::date) AND (((km_art)::text = 'EMAIA'::text) OR ((km_art)::text = 'TELA'::text)))
  • Rows Removed by Filter: 0
18. 33.548 33.548 ↑ 1.0 1 8,387

Index Scan using pk_orgeinh on orgeinh o (cost=0.28..0.32 rows=1 width=11) (actual time=0.003..0.004 rows=1 loops=8,387)

  • Index Cond: (((oe_orgeinh)::text = (u.orgeinh)::text) AND ((man)::text = (u.orgman)::text) AND ((ak)::text = (u.orgak)::text) AND (oe_ab <= '2020-05-14'::date))
  • Filter: (oe_bis >= '2020-05-14'::date)
  • Rows Removed by Filter: 1
19. 50.148 50.148 ↓ 0.0 0 8,358

Index Only Scan using ermusers on users ads (cost=0.29..0.41 rows=1 width=13) (actual time=0.006..0.006 rows=0 loops=8,358)

  • Index Cond: ((man = (p.man)::text) AND (ak = (p.ak)::text) AND (pnr = (p.pnr)::text) AND (u_ab <= now()) AND (u_bis >= now()))
  • Filter: ((u_id)::text = ANY ('{WEB86041000062,WEB86040000065,WEB86040000203,WEB86040000207,WEB86040000210,WEB86040000265,WEB86040000269,WEB86040000280,WEB86040000385,WEB86040000390,WEB86040000407,WEB86040000412,WEB86040000198,WEB86040000201,WEB86040000204,WEB86040000208,WEB86040000209,WEB86040000242,WEB86040000253,WEB86040000264,WEB86040000266,WEB86040000267,WEB86040000301,WEB86040000303,WEB86040000305,WEB86040000316,WEB86040000321,WEB86040000334,WEB86040000341,WEB86040000363,WEB86040000374,WEB86040000396,WEB86040000402,WEB86040000404,WEB86041000004,WEB86041000005,WEB86041000008,WEB86041000010,WEB86041000011,WEB86041000013,WEB86041000014,WEB86041000015,WEB86041000016,WEB86041000023,WEB86041000028,WEB86041000031,WEB86041000035,WEB86041000037,WEB86041000038,WEB86041000040,WEB86041000041,WEB86041000042,WEB86041000043,WEB86041000044,WEB86041000045,WEB86041000046,WEB86041000048,WEB86041000049,WEB86041000052,WEB86041000053,WEB86041000054,WEB86041000055,WEB86041000056,WEB86041000057,WEB86041000060,WEB86041000061,WEB86041000024}'::text[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 8442
Planning time : 24.488 ms
Execution time : 7,966.880 ms