explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6BOS

Settings
# exclusive inclusive rows x rows loops node
1. 2.358 6,378.964 ↑ 6.7 3 1

Hash Join (cost=26,302.52..844,884.87 rows=20 width=4) (actual time=3,138.741..6,378.964 rows=3 loops=1)

  • Hash Cond: ((fac.fac_nrutoperador = relacion_comer_localcliente.rco_nrutoperador) AND (fac.fac_nrutcliente = relacion_comer_localcliente.rco_nrutcliente) AND (fac.fac_nnumlocal = relacion_comer_localcliente.rco_nnumlocal) AND ((fac.fac_scodrelcomercial): (...)
2. 0.000 5,311.987 ↑ 10.8 1,925 1

Gather (cost=1,000.00..818,227.22 rows=20,845 width=21) (actual time=4.069..5,311.987 rows=1,925 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 5,997.536 5,997.536 ↑ 13.5 642 3

Parallel Seq Scan on factura fac (cost=0.00..815,142.72 rows=8,685 width=21) (actual time=13.339..5,997.536 rows=642 loops=3)

  • Filter: (((fac_scodestado)::text <> 'NULA'::text) AND (fac_nnumfactura <> '0'::numeric) AND ((fac_sindicadors2)::text = 'N'::text) AND ((fac_scoddoctooriginal)::text = 'PED'::text))
  • Rows Removed by Filter: 3429870
4. 526.771 1,064.619 ↓ 20.0 394,759 1

Hash (cost=24,907.58..24,907.58 rows=19,747 width=35) (actual time=1,064.619..1,064.619 rows=394,759 loops=1)

  • Buckets: 524288 (originally 32768) Batches: 1 (originally 1) Memory Usage: 30311kB
5. 209.023 537.848 ↓ 20.0 394,759 1

Gather (cost=1,094.62..24,907.58 rows=19,747 width=35) (actual time=6.744..537.848 rows=394,759 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 227.046 328.825 ↓ 16.0 131,586 3

Hash Join (cost=94.62..21,932.88 rows=8,228 width=35) (actual time=3.390..328.825 rows=131,586 loops=3)

  • Hash Cond: ((relacion_comer_localcliente.rco_nrutoperador = territorio.ter_nrutoperador) AND (relacion_comer_localcliente.rco_nidterritorio = territorio.ter_nidterritorio))
7. 99.946 99.946 ↑ 1.2 224,561 3

Parallel Seq Scan on relacion_comer_localcliente (cost=0.00..19,640.01 rows=280,701 width=29) (actual time=0.012..99.946 rows=224,561 loops=3)

8. 0.472 1.833 ↓ 8.6 1,375 3

Hash (cost=92.22..92.22 rows=160 width=22) (actual time=1.833..1.833 rows=1,375 loops=3)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 90kB
9. 1.008 1.361 ↓ 8.6 1,375 3

Hash Join (cost=3.30..92.22 rows=160 width=22) (actual time=0.183..1.361 rows=1,375 loops=3)

  • Hash Cond: ((territorio.ter_nrutoperador = operador_zona.ozo_nrutoperador) AND ((territorio.ter_scodzona)::text = (operador_zona.ozo_scodzona_asociada)::text))
10. 0.291 0.291 ↑ 1.0 2,216 3

Seq Scan on territorio (cost=0.00..65.16 rows=2,216 width=20) (actual time=0.021..0.291 rows=2,216 loops=3)

11. 0.030 0.062 ↑ 1.0 92 3

Hash (cost=1.92..1.92 rows=92 width=12) (actual time=0.062..0.062 rows=92 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
12. 0.032 0.032 ↑ 1.0 92 3

Seq Scan on operador_zona (cost=0.00..1.92 rows=92 width=12) (actual time=0.021..0.032 rows=92 loops=3)

Planning time : 1.722 ms
Execution time : 6,381.687 ms