explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aAL

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=139,336.72..139,336.73 rows=1 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Append (cost=132,788.35..139,336.71 rows=3 width=8) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Aggregate (cost=132,788.35..132,788.36 rows=1 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..132,788.35 rows=1 width=0) (actual rows= loops=)

  • Join Filter: (f.cod_factura = fc.cod_factura)
5. 0.000 0.000 ↓ 0.0

Index Scan using factura_fecha on factura f (cost=0.43..132,758.61 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((fecha >= '2019-10-01'::date) AND (fecha <= '2019-10-01'::date))
  • Filter: (NOT (SubPlan 1))
6.          

SubPlan (forIndex Scan)

7. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.34..264,930.57 rows=227,364 width=4) (actual rows= loops=)

  • Hash Cond: (nc.cod_motivo = mnc.cod_motivo)
8. 0.000 0.000 ↓ 0.0

Seq Scan on factura nc (cost=0.00..259,605.26 rows=813,420 width=8) (actual rows= loops=)

  • Filter: (fecha >= f.fecha)
9. 0.000 0.000 ↓ 0.0

Hash (cost=1.25..1.25 rows=7 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on motivosnotasdecredito mnc (cost=0.00..1.25 rows=7 width=4) (actual rows= loops=)

  • Filter: error_facturista
11. 0.000 0.000 ↓ 0.0

Seq Scan on facturas_controles fc (cost=0.00..29.60 rows=11 width=4) (actual rows= loops=)

  • Filter: (cod_usuario_fac_ref = 224)
12. 0.000 0.000 ↓ 0.0

Aggregate (cost=22.18..22.19 rows=1 width=8) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.63..22.18 rows=1 width=0) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using factura_fecha on factura f_1 (cost=0.43..8.45 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((fecha >= '2019-10-01'::date) AND (fecha <= '2019-10-01'::date))
  • Filter: (cod_usuario = 224)
15. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on errores_facturacion e (cost=4.20..13.67 rows=6 width=4) (actual rows= loops=)

  • Recheck Cond: (cod_comprobante = f_1.cod_factura)
16. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on errores_facturacion_pkey (cost=0.00..4.20 rows=6 width=0) (actual rows= loops=)

  • Index Cond: (cod_comprobante = f_1.cod_factura)
17. 0.000 0.000 ↓ 0.0

Aggregate (cost=6,526.12..6,526.13 rows=1 width=8) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..6,526.12 rows=1 width=0) (actual rows= loops=)

  • Join Filter: (e_1.cod_comprobante = t.cod_ticket)
19. 0.000 0.000 ↓ 0.0

Index Scan using idxtic on tickets t (cost=0.42..6,490.69 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((fecha >= '2019-10-01'::date) AND (fecha <= '2019-10-01'::date))
  • Filter: (cod_usuario = 224)
20. 0.000 0.000 ↓ 0.0

Seq Scan on errores_facturacion e_1 (cost=0.00..21.30 rows=1,130 width=4) (actual rows= loops=)