explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 66aH

Settings
# exclusive inclusive rows x rows loops node
1. 1,492.243 25,138.538 ↑ 1.4 40,317 1

Nested Loop (cost=0.84..130,431.12 rows=57,120 width=972) (actual time=2.571..25,138.538 rows=40,317 loops=1)

2. 0.007 0.007 ↑ 2,040.0 1 1

Seq Scan on param_medidas (cost=0.00..30.40 rows=2,040 width=6) (actual time=0.006..0.007 rows=1 loops=1)

3. 68.080 23,646.288 ↓ 1,439.9 40,317 1

Materialize (cost=0.84..86,275.59 rows=28 width=966) (actual time=0.728..23,646.288 rows=40,317 loops=1)

4. 6,038.367 23,578.208 ↓ 1,439.9 40,317 1

Nested Loop Left Join (cost=0.84..86,275.45 rows=28 width=966) (actual time=0.723..23,578.208 rows=40,317 loops=1)

  • Join Filter: ((a02.cliente)::text = (a00.su)::text)
  • Rows Removed by Join Filter: 45378751
5. 7,449.155 14,757.968 ↓ 8,063.4 40,317 1

Nested Loop Left Join (cost=0.84..86,168.92 rows=5 width=898) (actual time=0.243..14,757.968 rows=40,317 loops=1)

  • Join Filter: ((a01.vend)::text = (v0101.vendedor_1)::text)
  • Rows Removed by Join Filter: 59349077
6. 549.343 2,027.286 ↓ 40,317.0 40,317 1

Nested Loop Left Join (cost=0.84..86,123.78 rows=1 width=842) (actual time=0.102..2,027.286 rows=40,317 loops=1)

  • Join Filter: (x0601.pais = a00.pais_pedido)
  • Rows Removed by Join Filter: 5563988
7. 44.899 671.603 ↓ 40,317.0 40,317 1

Nested Loop Left Join (cost=0.84..86,118.65 rows=1 width=832) (actual time=0.070..671.603 rows=40,317 loops=1)

8. 90.654 425.119 ↓ 40,317.0 40,317 1

Nested Loop (cost=0.43..86,118.16 rows=1 width=828) (actual time=0.050..425.119 rows=40,317 loops=1)

9. 10.817 10.817 ↑ 1.0 40,456 1

Seq Scan on a00 (cost=0.00..1,999.56 rows=40,456 width=805) (actual time=0.004..10.817 rows=40,456 loops=1)

10. 323.648 323.648 ↑ 1.0 1 40,456

Index Scan using v0101_pkey on v0101 (cost=0.43..2.07 rows=1 width=34) (actual time=0.008..0.008 rows=1 loops=40,456)

  • Index Cond: ((empresa = a00.emp) AND (ejercicio = a00.eje) AND ((almacen)::text = (a00.alm)::text) AND ((tipo_doc)::text = 'PV'::text) AND (documento = a00.ped))
11. 201.585 201.585 ↑ 1.0 1 40,317

Index Scan using m_series_planificadas_idx01 on m_series_planificadas (cost=0.41..0.48 rows=1 width=23) (actual time=0.005..0.005 rows=1 loops=40,317)

  • Index Cond: ((serie)::text = (a00.serie)::text)
  • Filter: ((alm_serie)::text = (a00.alm)::text)
12. 806.340 806.340 ↑ 1.0 139 40,317

Seq Scan on x0601 (cost=0.00..3.39 rows=139 width=12) (actual time=0.001..0.020 rows=139 loops=40,317)

13. 5,281.527 5,281.527 ↑ 1.0 1,473 40,317

Seq Scan on a01 (cost=0.00..26.73 rows=1,473 width=70) (actual time=0.002..0.131 rows=1,473 loops=40,317)

14. 2,781.541 2,781.873 ↑ 1.0 1,126 40,317

Materialize (cost=0.00..24.89 rows=1,126 width=81) (actual time=0.000..0.069 rows=1,126 loops=40,317)

15. 0.332 0.332 ↑ 1.0 1,126 1

Seq Scan on a02 (cost=0.00..19.26 rows=1,126 width=81) (actual time=0.007..0.332 rows=1,126 loops=1)

Planning time : 5.187 ms
Execution time : 25,147.703 ms