explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rcCkH

Settings
# exclusive inclusive rows x rows loops node
1. 11,277.588 18,130.253 ↓ 1.0 6,044,205 1

WindowAgg (cost=2,308,083.57..2,510,772.38 rows=5,791,109 width=144) (actual time=6,030.061..18,130.253 rows=6,044,205 loops=1)

2. 2,574.238 6,852.665 ↓ 1.0 6,044,205 1

Sort (cost=2,308,083.57..2,322,561.34 rows=5,791,109 width=108) (actual time=6,030.043..6,852.665 rows=6,044,205 loops=1)

  • Sort Key: e_res.contrato_id, e_res.chave_mbdt, t_ftp.moment, e_res.moment
  • Sort Method: external merge Disk: 397,344kB
3. 1,257.239 4,278.427 ↓ 1.0 6,044,205 1

Gather (cost=635,450.48..1,263,403.23 rows=5,791,109 width=108) (actual time=1,555.924..4,278.427 rows=6,044,205 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
4. 958.311 3,021.188 ↑ 1.2 1,208,841 5 / 5

Merge Left Join (cost=634,450.48..683,292.33 rows=1,447,777 width=108) (actual time=1,547.696..3,021.188 rows=1,208,841 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,991
5. 740.969 1,755.226 ↑ 1.2 1,158,330 5 / 5

Sort (cost=616,090.56..619,710.00 rows=1,447,777 width=60) (actual time=1,545.302..1,755.226 rows=1,158,330 loops=5)

  • Sort Key: i_ftp.contrato_id, i_ftp.chave_mbdt
  • Sort Method: external merge Disk: 82,520kB
  • Worker 0: Sort Method: external merge Disk: 69,088kB
  • Worker 1: Sort Method: external merge Disk: 72,048kB
  • Worker 2: Sort Method: external merge Disk: 68,896kB
  • Worker 3: Sort Method: external merge Disk: 71,720kB
6. 557.479 1,014.257 ↑ 1.2 1,158,330 5 / 5

Parallel Hash Left Join (cost=26,124.36..436,060.18 rows=1,447,777 width=60) (actual time=37.995..1,014.257 rows=1,158,330 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. 419.020 419.020 ↑ 1.2 1,158,330 5 / 5

Parallel Seq Scan on mbw_logdereplicacaoestatistica i_ftp (cost=0.00..364,692.77 rows=1,447,777 width=66) (actual time=0.016..419.020 rows=1,158,330 loops=5)

8. 2.370 37.758 ↑ 1.6 4,800 5 / 5

Parallel Hash (cost=25,948.07..25,948.07 rows=7,835 width=70) (actual time=37.758..37.758 rows=4,800 loops=5)

  • Buckets: 32,768 Batches: 1 Memory Usage: 2,976kB
9. 34.199 35.388 ↑ 1.6 4,800 5 / 5

Parallel Bitmap Heap Scan on mbw_logdereplicacaoestatistica t_ftp (cost=615.82..25,948.07 rows=7,835 width=70) (actual time=6.627..35.388 rows=4,800 loops=5)

  • Recheck Cond: (((job)::text = 'jA_SFTP_Enviar'::text) AND ((message_type)::text = 'end'::text))
  • Heap Blocks: exact=8,950
10. 1.189 1.189 ↑ 1.0 24,002 1 / 5

Bitmap Index Scan on mbw_logdereplicacaoestatistica_message_type_f1eb790c_like2 (cost=0.00..609.75 rows=24,289 width=0) (actual time=5.943..5.943 rows=24,002 loops=1)

  • Index Cond: (((job)::text = 'jA_SFTP_Enviar'::text) AND ((message_type)::text = 'end'::text))
11. 305.646 307.651 ↓ 436.6 6,815,063 5 / 5

Sort (cost=18,359.92..18,398.95 rows=15,611 width=48) (actual time=2.386..307.651 rows=6,815,063 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. 2.005 2.005 ↑ 14.5 1,078 5 / 5

Index Only Scan using mbw_logdereplicacaoestatistica_message_type_f1eb790c_like2 on mbw_logdereplicacaoestatistica e_res (cost=0.56..17,272.59 rows=15,611 width=48) (actual time=0.057..2.005 rows=1,078 loops=5)

  • Index Cond: ((job = 'jA_Marcar_Entrada_Restore'::text) AND (message_type = 'end'::text))
  • Heap Fetches: 5,390
Planning time : 1.317 ms
Execution time : 18,578.086 ms