explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bvt6 : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #IkBn; plan #Ugqm; plan #oIwj; plan #wLUO; plan #Z1Rz; plan #px3m; plan #CIeE

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 9.063 85.269 ↓ 3.1 5,128 1

Hash Join (cost=5,789.65..15,387.17 rows=1,674 width=1,095) (actual time=44.149..85.269 rows=5,128 loops=1)

  • Hash Cond: ((SubPlan 1) = dnc.dnc_id)
2. 15.687 64.523 ↓ 3.1 5,128 1

Hash Join (cost=5,630.80..8,258.21 rows=1,674 width=1,055) (actual time=42.678..64.523 rows=5,128 loops=1)

  • Hash Cond: ((fec.ccm_clave_acceso)::text = (cnc.cnc_clave_acceso)::text)
3. 6.180 6.180 ↑ 1.0 49,794 1

Seq Scan on fe_comprobante fec (cost=0.00..2,423.94 rows=49,794 width=274) (actual time=0.003..6.180 rows=49,794 loops=1)

4. 4.532 42.656 ↓ 3.0 5,130 1

Hash (cost=5,609.38..5,609.38 rows=1,714 width=781) (actual time=42.656..42.656 rows=5,130 loops=1)

  • Buckets: 8192 (originally 2048) Batches: 1 (originally 1) Memory Usage: 1496kB
5. 16.863 38.124 ↓ 3.1 5,246 1

Hash Join (cost=300.25..5,609.38 rows=1,714 width=781) (actual time=2.738..38.124 rows=5,246 loops=1)

  • Hash Cond: ((ccm.pve_id = cnc.pve_id) AND (ccm.ccm_periodo = cnc.cnc_periodo) AND (ccm.cti_id = cnc.cti_id) AND (ccm.ccm_numero = cnc.cnc_numero))
6. 18.597 18.597 ↓ 1.0 85,675 1

Seq Scan on ccomproba ccm (cost=0.00..2,294.59 rows=85,640 width=73) (actual time=0.008..18.597 rows=85,675 loops=1)

  • Filter: (ccm_estado = 2)
  • Rows Removed by Filter: 1975
7. 1.925 2.664 ↑ 1.0 5,275 1

Hash (cost=194.75..194.75 rows=5,275 width=708) (actual time=2.664..2.664 rows=5,275 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 1182kB
8. 0.739 0.739 ↑ 1.0 5,275 1

Seq Scan on cnotacre cnc (cost=0.00..194.75 rows=5,275 width=708) (actual time=0.015..0.739 rows=5,275 loops=1)

9. 0.872 1.427 ↓ 1.0 5,285 1

Hash (cost=92.82..92.82 rows=5,282 width=40) (actual time=1.427..1.427 rows=5,285 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 380kB
10. 0.555 0.555 ↓ 1.0 5,285 1

Seq Scan on dnotacre dnc (cost=0.00..92.82 rows=5,282 width=40) (actual time=0.005..0.555 rows=5,285 loops=1)

11.          

SubPlan (forHash Join)

12. 0.000 10.256 ↑ 1.0 1 10,256

Limit (cost=0.28..8.30 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=10,256)

13. 10.256 10.256 ↑ 1.0 1 10,256

Index Scan using dnotacre_llave_cabecera on dnotacre d1 (cost=0.28..8.30 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=10,256)

  • Index Cond: (cnc_id = cnc.cnc_id)