explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0pr

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

Limit (cost=1,207.79..2,087.43 rows=12 width=2,366) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Result (cost=1,207.79..2,087.43 rows=12 width=2,366) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=1,207.79..1,207.82 rows=12 width=2,153) (actual rows= loops=)

  • Sort Key: animal.unit_id DESC
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=389.11..1,207.58 rows=12 width=2,153) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.98..1,205.57 rows=12 width=1,481) (actual rows= loops=)

  • Join Filter: (animal.disposition = disposition.id)
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.98..1,202.94 rows=12 width=1,317) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.84..1,201.11 rows=12 width=1,153) (actual rows= loops=)

  • Join Filter: (animal.gender = gender.id)
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.84..1,199.25 rows=12 width=989) (actual rows= loops=)

  • Join Filter: (animal.harvest = harvest.id)
9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.84..1,197.76 rows=12 width=907) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.69..1,195.68 rows=12 width=825) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.55..1,193.61 rows=12 width=743) (actual rows= loops=)

  • Join Filter: (research_unit.species = species.id)
12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.55..1,191.95 rows=12 width=661) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.40..1,189.90 rows=12 width=497) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=388.25..1,187.85 rows=12 width=333) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=387.97..1,182.79 rows=12 width=257) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=387.82..1,180.79 rows=12 width=242) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash Join (cost=387.54..1,175.65 rows=12 width=226) (actual rows= loops=)

  • Hash Cond: (animal.unit_id = research_unit.id)
  • Join Filter: ((research_unit.father_id = 1041) OR (animal.unit_id = 1040) OR (research_unit.mother_id = 1041) OR (animal.unit_id = 1038))
18. 0.000 0.000 ↓ 0.0

Seq Scan on animal (cost=0.00..765.19 rows=8,734 width=155) (actual rows= loops=)

  • Filter: ((unit_id <> 1041) OR (unit_id IS NULL))
19. 0.000 0.000 ↓ 0.0

Hash (cost=278.35..278.35 rows=8,735 width=71) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on research_unit (cost=0.00..278.35 rows=8,735 width=71) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Index Scan using animal_transfer_animal_id_idx on animal_transfer (cost=0.29..0.43 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (animal.unit_id = animal_id)
22. 0.000 0.000 ↓ 0.0

Index Scan using colony_pkey on colony (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (animal_transfer.colony_id = id)
23. 0.000 0.000 ↓ 0.0

Index Scan using cage_location_cage_position on cage_location location (cost=0.28..0.42 rows=1 width=76) (actual rows= loops=)

  • Index Cond: (animal_transfer.cage_id = cage_position_id)
24. 0.000 0.000 ↓ 0.0

Index Scan using color_pkey on color color1 (cost=0.15..0.17 rows=1 width=172) (actual rows= loops=)

  • Index Cond: (animal.color1_id = id)
25. 0.000 0.000 ↓ 0.0

Index Scan using color_pkey on color color2 (cost=0.15..0.17 rows=1 width=172) (actual rows= loops=)

  • Index Cond: (animal.color2_id = id)
26. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.06 rows=4 width=90) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on species (cost=0.00..1.04 rows=4 width=90) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using reason_not_breedable_pkey on reason_not_breedable "nonBreedableReason" (cost=0.15..0.17 rows=1 width=90) (actual rows= loops=)

  • Index Cond: (animal.reason_not_breedable = id)
29. 0.000 0.000 ↓ 0.0

Index Scan using death_reason_pkey on death_reason "deathReason" (cost=0.15..0.17 rows=1 width=90) (actual rows= loops=)

  • Index Cond: (animal.reason_of_death = id)
30. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.04 rows=3 width=90) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on harvest (cost=0.00..1.03 rows=3 width=90) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.08 rows=5 width=172) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on gender (cost=0.00..1.05 rows=5 width=172) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Index Scan using genotype_status_pkey on genotype_status "genotypeStatus" (cost=0.14..0.15 rows=1 width=172) (actual rows= loops=)

  • Index Cond: (animal.genotype_status = id)
35. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.14 rows=9 width=172) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on disposition (cost=0.00..1.09 rows=9 width=172) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Index Scan using source_type_pkey on source_type "sourceType" (cost=0.14..0.15 rows=1 width=606) (actual rows= loops=)

  • Index Cond: (animal.source_type = id)
38.          

SubPlan (forResult)

39. 0.000 0.000 ↓ 0.0

Aggregate (cost=23.58..23.59 rows=1 width=32) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Hash Join (cost=14.47..23.56 rows=8 width=10) (actual rows= loops=)

  • Hash Cond: (tag.id = tag_unit.tag_id)
41. 0.000 0.000 ↓ 0.0

Seq Scan on tag (cost=0.00..7.64 rows=364 width=18) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash (cost=14.37..14.37 rows=8 width=8) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on tag_unit (cost=4.21..14.37 rows=8 width=8) (actual rows= loops=)

  • Recheck Cond: (unit_id = research_unit.id)
44. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on tag_unit_index (cost=0.00..4.21 rows=8 width=0) (actual rows= loops=)

  • Index Cond: (unit_id = research_unit.id)
45. 0.000 0.000 ↓ 0.0

Index Scan using idx_task_status_duedate_animal on task (cost=0.14..8.32 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((status_id = ANY ('{11,14}'::bigint[])) AND (animal.unit_id = animal_id))
  • Filter: (type_id = ANY ('{18,38,53}'::bigint[]))
46. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on task task_1 (cost=4.31..9.65 rows=1 width=8) (actual rows= loops=)

  • Recheck Cond: (status_id = ANY ('{11,14}'::bigint[]))
  • Filter: (type_id = ANY ('{18,38,53}'::bigint[]))
47. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_task_status_duedate_animal (cost=0.00..4.30 rows=2 width=0) (actual rows= loops=)

  • Index Cond: (status_id = ANY ('{11,14}'::bigint[]))
48. 0.000 0.000 ↓ 0.0

Limit (cost=16.52..16.52 rows=1 width=90) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Sort (cost=16.52..16.52 rows=1 width=90) (actual rows= loops=)

  • Sort Key: m.id
50. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..16.51 rows=1 width=90) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Index Scan using animal_marker_animal_id_type_id_key on animal_marker m (cost=0.29..8.30 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (animal_id = animal.id)
52. 0.000 0.000 ↓ 0.0

Index Scan using marker_type_pkey on marker_type t (cost=0.15..8.17 rows=1 width=90) (actual rows= loops=)

  • Index Cond: (id = m.type_id)
53. 0.000 0.000 ↓ 0.0

Limit (cost=16.52..16.52 rows=1 width=90) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Sort (cost=16.52..16.52 rows=1 width=90) (actual rows= loops=)

  • Sort Key: m_1.id
55. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..16.51 rows=1 width=90) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Index Scan using animal_marker_animal_id_type_id_key on animal_marker m_1 (cost=0.29..8.30 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (animal_id = animal.id)
57. 0.000 0.000 ↓ 0.0

Index Scan using marker_type_pkey on marker_type t_1 (cost=0.15..8.17 rows=1 width=90) (actual rows= loops=)

  • Index Cond: (id = m_1.type_id)
58. 0.000 0.000 ↓ 0.0

Limit (cost=8.31..8.32 rows=1 width=11) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Sort (cost=8.31..8.32 rows=1 width=11) (actual rows= loops=)

  • Sort Key: m_2.id
60. 0.000 0.000 ↓ 0.0

Index Scan using animal_marker_animal_id_type_id_key on animal_marker m_2 (cost=0.29..8.30 rows=1 width=11) (actual rows= loops=)