explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ebJd

Settings
# exclusive inclusive rows x rows loops node
1. 0.046 43,611.899 ↓ 78.3 705 1

Limit (cost=4,647,109.52..4,647,109.55 rows=9 width=10,498) (actual time=43,611.680..43,611.899 rows=705 loops=1)

2. 4.295 43,611.853 ↓ 78.3 705 1

Sort (cost=4,647,109.52..4,647,109.55 rows=9 width=10,498) (actual time=43,611.677..43,611.853 rows=705 loops=1)

  • Sort Key: payoutorde0_.orden_pago_id
  • Sort Method: quicksort Memory: 2120kB
3. 88.086 43,607.558 ↓ 78.3 705 1

Nested Loop (cost=357.48..4,647,109.38 rows=9 width=10,498) (actual time=43,587.469..43,607.558 rows=705 loops=1)

  • Join Filter: (payoutorde0_.banco_id = bank8_.banco_id)
  • Rows Removed by Join Filter: 810750
4. 0.162 0.162 ↑ 1.0 1,151 1

Seq Scan on banco bank8_ (cost=0.00..23.51 rows=1,151 width=1,595) (actual time=0.027..0.162 rows=1,151 loops=1)

5. 43.387 43,519.310 ↓ 78.3 705 1,151

Materialize (cost=357.48..4,646,930.51 rows=9 width=8,895) (actual time=0.064..37.810 rows=705 loops=1,151)

6. 53.557 43,475.923 ↓ 78.3 705 1

Nested Loop Left Join (cost=357.48..4,646,930.46 rows=9 width=8,895) (actual time=73.251..43,475.923 rows=705 loops=1)

  • Join Filter: (accountban5_.banco_intermediacion_id = bank7_.banco_id)
  • Rows Removed by Join Filter: 811446
7. 64.932 43,387.821 ↓ 78.3 705 1

Nested Loop Left Join (cost=357.48..4,646,748.69 rows=9 width=7,300) (actual time=72.903..43,387.821 rows=705 loops=1)

  • Join Filter: (accountban5_.banco_id = bank6_.banco_id)
  • Rows Removed by Join Filter: 810750
8. 3.404 43,277.769 ↓ 78.3 705 1

Nested Loop Left Join (cost=357.48..4,646,566.92 rows=9 width=5,705) (actual time=72.491..43,277.769 rows=705 loops=1)

9. 4.242 43,251.100 ↓ 78.3 705 1

Nested Loop (cost=357.06..4,646,562.46 rows=9 width=5,361) (actual time=72.461..43,251.100 rows=705 loops=1)

10. 3.127 43,225.708 ↓ 78.3 705 1

Nested Loop (cost=356.63..4,646,556.65 rows=9 width=4,184) (actual time=72.414..43,225.708 rows=705 loops=1)

  • Join Filter: (payoutorde0_.cuenta_id = account3_.cuenta_id)
11. 5.008 43,211.301 ↓ 78.3 705 1

Nested Loop (cost=356.21..4,646,524.67 rows=9 width=2,903) (actual time=72.406..43,211.301 rows=705 loops=1)

12. 11.588 43,124.513 ↓ 78.3 705 1

Hash Left Join (cost=355.79..4,646,451.17 rows=9 width=1,622) (actual time=72.297..43,124.513 rows=705 loops=1)

  • 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)))
  • Rows Removed by Filter: 1389
13. 7.962 7.962 ↓ 2.2 2,094 1

Index Scan using idx_orden_pago_fecha_creacion on orden_pago payoutorde0_ (cost=0.42..2,533.74 rows=945 width=1,042) (actual time=0.575..7.962 rows=2,094 loops=1)

  • 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. 2.144 6.993 ↓ 1.1 11,804 1

Hash (cost=219.05..219.05 rows=10,905 width=580) (actual time=6.993..6.993 rows=11,804 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1012kB
15. 4.849 4.849 ↓ 1.1 11,804 1

Seq Scan on documento_ordenes_pago providerre2_ (cost=0.00..219.05 rows=10,905 width=580) (actual time=0.019..4.849 rows=11,804 loops=1)

16.          

SubPlan (forHash Left Join)

17. 7.770 43,097.970 ↑ 1.0 1 1,110

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

18. 43,090.200 43,090.200 ↑ 2.0 1 1,110

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

  • Filter: (((tipo)::text = ANY ('{CREDIT,ANTICIPATION}'::text[])) AND (valor_ajustado > '0'::numeric) AND (orden_pago_id = payoutorde0_.orden_pago_id))
  • Rows Removed by Filter: 135896
19. 81.780 81.780 ↑ 1.0 1 705

Index Scan using cuenta_pkey on cuenta account1_ (cost=0.42..8.16 rows=1 width=1,281) (actual time=0.116..0.116 rows=1 loops=705)

  • Index Cond: (cuenta_id = payoutorde0_.cuenta_id)
20. 11.280 11.280 ↑ 1.0 1 705

Index Scan using cuenta_pkey on cuenta account3_ (cost=0.42..3.54 rows=1 width=1,281) (actual time=0.003..0.016 rows=1 loops=705)

  • Index Cond: (cuenta_id = account1_.cuenta_id)
21. 21.150 21.150 ↑ 1.0 1 705

Index Scan using usuario_pkey on usuario merchant4_ (cost=0.42..0.64 rows=1 width=1,177) (actual time=0.029..0.030 rows=1 loops=705)

  • Index Cond: (usuario_id = account3_.usuario_id)
22. 23.265 23.265 ↑ 1.0 1 705

Index Scan using datos_bancarios_pkey on datos_bancarios accountban5_ (cost=0.42..0.49 rows=1 width=344) (actual time=0.032..0.033 rows=1 loops=705)

  • Index Cond: (account3_.cuenta_id = cuenta_id)
23. 44.964 45.120 ↑ 1.0 1,151 705

Materialize (cost=0.00..29.26 rows=1,151 width=1,595) (actual time=0.001..0.064 rows=1,151 loops=705)

24. 0.156 0.156 ↑ 1.0 1,151 1

Seq Scan on banco bank6_ (cost=0.00..23.51 rows=1,151 width=1,595) (actual time=0.007..0.156 rows=1,151 loops=1)

25. 34.450 34.545 ↑ 1.0 1,151 705

Materialize (cost=0.00..29.26 rows=1,151 width=1,595) (actual time=0.000..0.049 rows=1,151 loops=705)

26. 0.095 0.095 ↑ 1.0 1,151 1

Seq Scan on banco bank7_ (cost=0.00..23.51 rows=1,151 width=1,595) (actual time=0.002..0.095 rows=1,151 loops=1)