explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kKvn

Settings
# exclusive inclusive rows x rows loops node
1. 11,367.309 32,901.624 ↓ 1.0 6,044,180 1

WindowAgg (cost=2,349,721.11..2,552,468.41 rows=5,792,780 width=144) (actual time=20,706.861..32,901.624 rows=6,044,180 loops=1)

2. 2,688.861 21,534.315 ↓ 1.0 6,044,180 1

Sort (cost=2,349,721.11..2,364,203.06 rows=5,792,780 width=108) (actual time=20,706.843..21,534.315 rows=6,044,180 loops=1)

  • Sort Key: e_res.contrato_id, e_res.chave_mbdt, t_ftp.moment, e_res.moment
  • Sort Method: external merge Disk: 397,328kB
3. 1,033.186 18,845.454 ↓ 1.0 6,044,180 1

Gather (cost=669,778.58..1,304,726.22 rows=5,792,780 width=108) (actual time=16,166.748..18,845.454 rows=6,044,180 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
4. 1,079.837 17,812.268 ↑ 1.2 1,208,836 5 / 5

Merge Left Join (cost=668,778.58..724,448.22 rows=1,448,195 width=108) (actual time=16,165.974..17,812.268 rows=1,208,836 loops=5)

  • Merge Cond: ((i_ftp.contrato_id = e_res.contrato_id) AND ((i_ftp.chave_mbdt)::text = (e_res.chave_mbdt)::text))
  • Join Filter: (e_res.moment > t_ftp.moment)
  • Rows Removed by Join Filter: 6,755,962
5. 941.349 16,392.790 ↑ 1.3 1,158,325 5 / 5

Sort (cost=628,202.13..631,822.62 rows=1,448,195 width=60) (actual time=16,160.543..16,392.790 rows=1,158,325 loops=5)

  • Sort Key: i_ftp.contrato_id, i_ftp.chave_mbdt
  • Sort Method: external merge Disk: 75,408kB
  • Worker 0: Sort Method: external merge Disk: 71,776kB
  • Worker 1: Sort Method: external merge Disk: 74,104kB
  • Worker 2: Sort Method: external merge Disk: 72,392kB
  • Worker 3: Sort Method: external merge Disk: 70,544kB
6. 781.641 15,451.441 ↑ 1.3 1,158,325 5 / 5

Parallel Hash Left Join (cost=47,217.92..448,117.76 rows=1,448,195 width=60) (actual time=1,369.719..15,451.441 rows=1,158,325 loops=5)

  • Hash Cond: (((i_ftp.pid)::text = (t_ftp.pid)::text) AND ((i_ftp.father_pid)::text = (t_ftp.father_pid)::text) AND (i_ftp.system_pid = t_ftp.system_pid) AND (i_ftp.contrato_id = t_ftp.contrato_id) AND ((i_ftp.chave_mbdt)::text = (t_ftp.chave_mbdt)::text))
7. 13,300.334 13,300.334 ↑ 1.3 1,158,325 5 / 5

Parallel Seq Scan on mbw_logdereplicacaoestatistica i_ftp (cost=0.00..364,694.95 rows=1,448,195 width=66) (actual time=0.038..13,300.334 rows=1,158,325 loops=5)

8. 4.276 1,369.466 ↑ 1.2 4,800 5 / 5

Parallel Hash (cost=47,087.27..47,087.27 rows=5,807 width=70) (actual time=1,369.466..1,369.466 rows=4,800 loops=5)

  • Buckets: 32,768 Batches: 1 Memory Usage: 2,944kB
9. 1,363.252 1,365.190 ↑ 1.2 4,800 5 / 5

Parallel Bitmap Heap Scan on mbw_logdereplicacaoestatistica t_ftp (cost=631.13..47,087.27 rows=5,807 width=70) (actual time=23.548..1,365.190 rows=4,800 loops=5)

  • Recheck Cond: ((job)::text = 'jA_SFTP_Enviar'::text)
  • Filter: ((message_type)::text = 'end'::text)
  • Rows Removed by Filter: 4,863
  • Heap Blocks: exact=7,501
10. 1.938 1.938 ↓ 1.0 48,315 1 / 5

Bitmap Index Scan on mbw_logdereplicacaoestatistica_job_38b18b41_like (cost=0.00..625.32 rows=46,342 width=0) (actual time=9.688..9.688 rows=48,315 loops=1)

  • Index Cond: ((job)::text = 'jA_SFTP_Enviar'::text)
11. 334.793 339.641 ↓ 361.2 6,815,033 5 / 5

Sort (cost=40,576.44..40,623.62 rows=18,869 width=48) (actual time=5.422..339.641 rows=6,815,033 loops=5)

  • Sort Key: e_res.contrato_id, e_res.chave_mbdt
  • Sort Method: quicksort Memory: 200kB
  • Worker 0: Sort Method: quicksort Memory: 200kB
  • Worker 1: Sort Method: quicksort Memory: 200kB
  • Worker 2: Sort Method: quicksort Memory: 200kB
  • Worker 3: Sort Method: quicksort Memory: 200kB
12. 4.458 4.848 ↑ 17.5 1,078 5 / 5

Bitmap Heap Scan on mbw_logdereplicacaoestatistica e_res (cost=512.03..39,236.39 rows=18,869 width=48) (actual time=0.571..4.848 rows=1,078 loops=5)

  • Recheck Cond: ((job)::text = 'jA_Marcar_Entrada_Restore'::text)
  • Filter: ((message_type)::text = 'end'::text)
  • Rows Removed by Filter: 1,078
  • Heap Blocks: exact=1,180
13. 0.390 0.390 ↑ 17.5 2,156 5 / 5

Bitmap Index Scan on mbw_logdereplicacaoestatistica_job_38b18b41_like (cost=0.00..507.32 rows=37,648 width=0) (actual time=0.390..0.390 rows=2,156 loops=5)

  • Index Cond: ((job)::text = 'jA_Marcar_Entrada_Restore'::text)
Planning time : 0.983 ms
Execution time : 33,397.518 ms