explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6PXu

Settings
# exclusive inclusive rows x rows loops node
1. 1,600.021 50,891.923 ↓ 20.0 40,875 1

Nested Loop (cost=0.84..46,225.05 rows=2,040 width=822) (actual time=3.550..50,891.923 rows=40,875 loops=1)

2. 573.924 49,251.027 ↓ 40,875.0 40,875 1

Nested Loop Left Join (cost=0.84..44,623.85 rows=1 width=816) (actual time=3.085..49,251.027 rows=40,875 loops=1)

  • Join Filter: (x0601.pais = a00.pais_pedido)
  • Rows Removed by Join Filter: 5640992
3. 14,308.227 47,859.603 ↓ 40,875.0 40,875 1

Nested Loop Left Join (cost=0.84..44,618.72 rows=1 width=806) (actual time=3.067..47,859.603 rows=40,875 loops=1)

  • Join Filter: ((m_planos.plano)::text = (a00.plano)::text)
  • Rows Removed by Join Filter: 142809361
4. 19.550 687.876 ↓ 40,875.0 40,875 1

Nested Loop Left Join (cost=0.84..44,472.10 rows=1 width=792) (actual time=1.650..687.876 rows=40,875 loops=1)

5. 79.734 463.951 ↓ 40,875.0 40,875 1

Nested Loop (cost=0.43..44,471.52 rows=1 width=788) (actual time=1.635..463.951 rows=40,875 loops=1)

6. 15.091 15.091 ↓ 2.9 41,014 1

Seq Scan on a00 (cost=0.00..1,921.32 rows=14,232 width=765) (actual time=0.004..15.091 rows=41,014 loops=1)

7. 369.126 369.126 ↑ 1.0 1 41,014

Index Scan using v0101_pkey on v0101 (cost=0.43..2.98 rows=1 width=34) (actual time=0.008..0.009 rows=1 loops=41,014)

  • 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))
8. 204.375 204.375 ↑ 1.0 1 40,875

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

  • Index Cond: ((serie)::text = (a00.serie)::text)
  • Filter: ((alm_serie)::text = (a00.alm)::text)
9. 32,863.500 32,863.500 ↑ 1.0 3,494 40,875

Seq Scan on m_planos (cost=0.00..102.94 rows=3,494 width=26) (actual time=0.001..0.804 rows=3,494 loops=40,875)

10. 817.500 817.500 ↑ 1.0 139 40,875

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

11. 40.875 40.875 ↑ 2,040.0 1 40,875

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

Planning time : 2.665 ms
Execution time : 50,897.474 ms