explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xWq6

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

Limit (cost=4,591,942.81..4,591,942.83 rows=9 width=1,470) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=4,591,942.81..4,591,942.83 rows=9 width=1,470) (actual rows= loops=)

  • Sort Key: payoutorde0_.orden_pago_id
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=357.48..4,591,942.67 rows=9 width=1,470) (actual rows= loops=)

  • Join Filter: (payoutorde0_.banco_id = bank8_.banco_id)
4. 0.000 0.000 ↓ 0.0

Seq Scan on banco bank8_ (cost=0.00..23.51 rows=1,151 width=39) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Materialize (cost=357.48..4,591,763.80 rows=9 width=1,431) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=357.48..4,591,763.75 rows=9 width=1,431) (actual rows= loops=)

  • Join Filter: (accountban5_.banco_intermediacion_id = bank7_.banco_id)
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=357.48..4,591,581.98 rows=9 width=1,392) (actual rows= loops=)

  • Join Filter: (accountban5_.banco_id = bank6_.banco_id)
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=357.48..4,591,400.21 rows=9 width=1,353) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=357.06..4,591,395.75 rows=9 width=1,105) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=356.63..4,591,389.94 rows=9 width=1,087) (actual rows= loops=)

  • Join Filter: (payoutorde0_.cuenta_id = account3_.cuenta_id)
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=356.21..4,591,357.96 rows=9 width=959) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=355.79..4,591,320.53 rows=9 width=955) (actual rows= loops=)

  • Hash Cond: (payoutorde0_.documento_ordenes_pago_id = providerre2_.documento_ordenes_pago_id)
  • Filter: (((providerre2_.proveedor)::text = 'BR_CIP'::text) OR (((payoutorde0_.estado_orden_pago)::text = 'IN_PAYU_PROCESS'::text) AND ((payoutorde0_.pais_cuenta_recaudo)::text = 'BR'::text) AND ((SubPlan 1) > 0)))
13. 0.000 0.000 ↓ 0.0

Index Scan using idx_orden_pago_fecha_creacion on orden_pago payoutorde0_ (cost=0.42..2,504.70 rows=934 width=955) (actual rows= loops=)

  • Index Cond: ((fecha_creacion >= '2019-02-05 00:00:00'::timestamp without time zone) AND (fecha_creacion < '2019-02-05 23:59:59'::timestamp without time zone))
14. 0.000 0.000 ↓ 0.0

Hash (cost=219.05..219.05 rows=10,905 width=22) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on documento_ordenes_pago providerre2_ (cost=0.00..219.05 rows=10,905 width=22) (actual rows= loops=)

16.          

SubPlan (forHash Left Join)

17. 0.000 0.000 ↓ 0.0

Aggregate (cost=5,009.20..5,009.21 rows=1 width=8) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on orden_pago_detalle payoutorde9_ (cost=0.00..5,009.20 rows=2 width=37) (actual rows= loops=)

  • Filter: (((tipo)::text = ANY ('{CREDIT,ANTICIPATION}'::text[])) AND (valor_ajustado > '0'::numeric) AND (orden_pago_id = payoutorde0_.orden_pago_id))
19. 0.000 0.000 ↓ 0.0

Index Only Scan using cuenta_pkey on cuenta account1_ (cost=0.42..4.15 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (cuenta_id = payoutorde0_.cuenta_id)
20. 0.000 0.000 ↓ 0.0

Index Scan using cuenta_pkey on cuenta account3_ (cost=0.42..3.54 rows=1 width=132) (actual rows= loops=)

  • Index Cond: (cuenta_id = account1_.cuenta_id)
21. 0.000 0.000 ↓ 0.0

Index Scan using usuario_pkey on usuario merchant4_ (cost=0.42..0.64 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (usuario_id = account3_.usuario_id)
22. 0.000 0.000 ↓ 0.0

Index Scan using datos_bancarios_pkey on datos_bancarios accountban5_ (cost=0.42..0.49 rows=1 width=248) (actual rows= loops=)

  • Index Cond: (account3_.cuenta_id = cuenta_id)
23. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..29.26 rows=1,151 width=39) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Seq Scan on banco bank6_ (cost=0.00..23.51 rows=1,151 width=39) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..29.26 rows=1,151 width=39) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on banco bank7_ (cost=0.00..23.51 rows=1,151 width=39) (actual rows= loops=)