explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mjSX

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

Aggregate (cost=15,125.43..15,125.44 rows=1 width=0) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=15,092.21..15,125.42 rows=1 width=0) (actual rows= loops=)

  • Join Filter: (gel5.ganado_id = g.ganado_id)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=15,091.93..15,125.08 rows=1 width=12) (actual rows= loops=)

  • Join Filter: (ger5.ganado_id = gel5.ganado_id)
4. 0.000 0.000 ↓ 0.0

Merge Join (cost=6,293.91..6,293.95 rows=1 width=8) (actual rows= loops=)

  • Merge Cond: (gel5.ganado_id = gf5.ganado_id)
5. 0.000 0.000 ↓ 0.0

Sort (cost=2,743.94..2,743.95 rows=3 width=4) (actual rows= loops=)

  • Sort Key: gel5.ganado_id
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,719.20..2,743.92 rows=3 width=4) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,718.91..2,718.94 rows=3 width=8) (actual rows= loops=)

  • Group Key: gel3.ganado_id
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,126.49..2,718.90 rows=3 width=8) (actual rows= loops=)

  • Hash Cond: ((gel.ganado_id = gel3.ganado_id) AND ((max(gel.created)) = gel3.created))
9. 0.000 0.000 ↓ 0.0

HashAggregate (cost=927.33..1,026.06 rows=9,873 width=12) (actual rows= loops=)

  • Group Key: gel.ganado_id
10. 0.000 0.000 ↓ 0.0

Seq Scan on ganado_estado_leche gel (cost=0.00..791.41 rows=27,183 width=12) (actual rows= loops=)

  • Filter: (isactive = 'Y'::bpchar)
11. 0.000 0.000 ↓ 0.0

Hash (cost=791.41..791.41 rows=27,183 width=16) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on ganado_estado_leche gel3 (cost=0.00..791.41 rows=27,183 width=16) (actual rows= loops=)

  • Filter: (isactive = 'Y'::bpchar)
13. 0.000 0.000 ↓ 0.0

Index Scan using ganado_estado_leche_pk on ganado_estado_leche gel5 (cost=0.29..8.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (ganado_estado_leche_id = (max(gel3.ganado_estado_leche_id)))
14. 0.000 0.000 ↓ 0.0

Sort (cost=3,549.98..3,549.98 rows=2 width=4) (actual rows= loops=)

  • Sort Key: gf5.ganado_id
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3,533.58..3,549.97 rows=2 width=4) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

HashAggregate (cost=3,533.30..3,533.32 rows=2 width=8) (actual rows= loops=)

  • Group Key: gf3.ganado_id
17. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,563.38..3,533.28 rows=2 width=8) (actual rows= loops=)

  • Hash Cond: ((gf.ganado_id = gf3.ganado_id) AND ((max(gf.created)) = gf3.created))
18. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,120.87..1,336.40 rows=21,553 width=12) (actual rows= loops=)

  • Group Key: gf.ganado_id
19. 0.000 0.000 ↓ 0.0

Seq Scan on ganado_fundo gf (cost=0.00..960.05 rows=32,164 width=12) (actual rows= loops=)

  • Filter: (isactive = 'Y'::bpchar)
20. 0.000 0.000 ↓ 0.0

Hash (cost=960.05..960.05 rows=32,164 width=16) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on ganado_fundo gf3 (cost=0.00..960.05 rows=32,164 width=16) (actual rows= loops=)

  • Filter: (isactive = 'Y'::bpchar)
22. 0.000 0.000 ↓ 0.0

Index Scan using ganado_fundo_pk on ganado_fundo gf5 (cost=0.29..8.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (ganado_fundo_id = (max(gf3.ganado_fundo_id)))
23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8,798.01..8,831.08 rows=4 width=4) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

HashAggregate (cost=8,797.72..8,797.76 rows=4 width=8) (actual rows= loops=)

  • Group Key: ger3.ganado_id
25. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,638.69..8,797.70 rows=4 width=8) (actual rows= loops=)

  • Hash Cond: ((ger.ganado_id = ger3.ganado_id) AND ((max(ger.created)) = ger3.created))
26. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,823.32..2,939.86 rows=11,654 width=12) (actual rows= loops=)

  • Group Key: ger.ganado_id
27. 0.000 0.000 ↓ 0.0

Seq Scan on ganado_estado_reproductivo ger (cost=0.00..2,490.29 rows=66,606 width=12) (actual rows= loops=)

  • Filter: (isactive = 'Y'::bpchar)
28. 0.000 0.000 ↓ 0.0

Hash (cost=2,490.29..2,490.29 rows=66,606 width=16) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on ganado_estado_reproductivo ger3 (cost=0.00..2,490.29 rows=66,606 width=16) (actual rows= loops=)

  • Filter: (isactive = 'Y'::bpchar)
30. 0.000 0.000 ↓ 0.0

Index Scan using ganado_estado_reproductivo_pk on ganado_estado_reproductivo ger5 (cost=0.29..8.31 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (ganado_estado_reproductivo_id = (max(ger3.ganado_estado_reproductivo_id)))
31. 0.000 0.000 ↓ 0.0

Index Only Scan using ganado_pk on ganado g (cost=0.29..0.33 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (ganado_id = ger5.ganado_id)