explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9BEn

Settings
# exclusive inclusive rows x rows loops node
1. 0.070 108,429.196 ↑ 1.0 100 1

Limit (cost=1.85..14,502.66 rows=100 width=771) (actual time=108,399.961..108,429.196 rows=100 loops=1)

2. 1.162 108,429.126 ↑ 7,058.9 100 1

Nested Loop Left Join (cost=1.85..102,359,619.89 rows=705,889 width=771) (actual time=108,399.958..108,429.126 rows=100 loops=1)

  • Join Filter: (animal.source_type = "sourceType".id)
  • Rows Removed by Join Filter: 598
3. 0.331 108,404.564 ↑ 7,058.9 100 1

Nested Loop Left Join (cost=1.85..8,863,744.00 rows=705,889 width=423) (actual time=108,398.853..108,404.564 rows=100 loops=1)

  • Join Filter: (animal.genotype_status = "genotypeStatus".id)
  • Rows Removed by Join Filter: 495
4. 0.183 108,404.133 ↑ 7,058.9 100 1

Nested Loop Left Join (cost=1.85..8,800,212.92 rows=705,889 width=412) (actual time=108,398.836..108,404.133 rows=100 loops=1)

  • Join Filter: (animal.gender = gender.id)
  • Rows Removed by Join Filter: 198
5. 0.134 108,403.850 ↑ 7,058.9 100 1

Nested Loop Left Join (cost=1.85..8,768,446.88 rows=705,889 width=405) (actual time=108,398.822..108,403.850 rows=100 loops=1)

  • Join Filter: (animal.harvest = harvest.id)
  • Rows Removed by Join Filter: 99
6. 0.523 108,403.616 ↑ 7,058.9 100 1

Nested Loop Left Join (cost=1.85..8,747,269.18 rows=705,889 width=399) (actual time=108,398.810..108,403.616 rows=100 loops=1)

  • Join Filter: (animal.reason_of_death = "deathReason".id)
  • Rows Removed by Join Filter: 1400
7. 0.216 108,402.793 ↑ 7,058.9 100 1

Nested Loop Left Join (cost=1.85..8,599,031.32 rows=705,889 width=387) (actual time=108,398.772..108,402.793 rows=100 loops=1)

  • Join Filter: (animal.reason_not_breedable = "nonBreedableReason".id)
  • Rows Removed by Join Filter: 600
8. 4,986.172 108,402.377 ↑ 7,058.9 100 1

Nested Loop (cost=1.85..8,535,500.23 rows=705,889 width=381) (actual time=108,398.741..108,402.377 rows=100 loops=1)

  • Join Filter: (animal.disposition = disposition.id)
  • Rows Removed by Join Filter: 4220146
9. 6,178.180 103,416.205 ↑ 1.0 4,220,246 1

Nested Loop Left Join (cost=1.85..8,471,969.11 rows=4,235,336 width=369) (actual time=2.539..103,416.205 rows=4,220,246 loops=1)

  • Join Filter: (research_unit.species = species.id)
  • Rows Removed by Join Filter: 8440490
10. 11,390.875 93,017.779 ↑ 1.0 4,220,246 1

Nested Loop Left Join (cost=1.85..8,281,377.96 rows=4,235,336 width=364) (actual time=2.531..93,017.779 rows=4,220,246 loops=1)

  • Join Filter: (animal.color2_id = color2.id)
  • Rows Removed by Join Filter: 33761968
11. 11,915.347 73,186.412 ↑ 1.0 4,220,246 1

Nested Loop Left Join (cost=1.85..7,773,136.54 rows=4,235,336 width=353) (actual time=2.510..73,186.412 rows=4,220,246 loops=1)

  • Join Filter: (animal.color1_id = color1.id)
  • Rows Removed by Join Filter: 30972884
12. 5,270.391 52,830.573 ↑ 1.0 4,220,246 1

Nested Loop Left Join (cost=1.85..7,264,895.12 rows=4,235,336 width=342) (actual time=2.489..52,830.573 rows=4,220,246 loops=1)

13. 5,258.056 47,560.182 ↑ 1.0 4,220,246 1

Nested Loop Left Join (cost=1.56..5,703,267.49 rows=4,235,336 width=277) (actual time=2.478..47,560.182 rows=4,220,246 loops=1)

14. 6,376.754 42,302.126 ↑ 1.0 4,220,246 1

Nested Loop Left Join (cost=1.28..4,416,681.87 rows=4,235,336 width=268) (actual time=2.470..42,302.126 rows=4,220,246 loops=1)

15. 7,605.473 31,705.126 ↑ 1.0 4,220,246 1

Nested Loop (cost=0.86..2,521,037.35 rows=4,235,336 width=252) (actual time=2.459..31,705.126 rows=4,220,246 loops=1)

16. 15,659.161 15,659.161 ↑ 1.0 4,220,246 1

Index Scan Backward using animal_dict_disposition_idx on animal (cost=0.43..355,942.79 rows=4,235,336 width=192) (actual time=2.440..15,659.161 rows=4,220,246 loops=1)

17. 8,440.492 8,440.492 ↑ 1.0 1 4,220,246

Index Scan using research_unit_pkey on research_unit (cost=0.43..0.50 rows=1 width=60) (actual time=0.002..0.002 rows=1 loops=4,220,246)

  • Index Cond: (id = animal.unit_id)
18. 4,220.246 4,220.246 ↓ 0.0 0 4,220,246

Index Scan using animal_transfer_animal_id_idx on animal_transfer (cost=0.42..0.44 rows=1 width=24) (actual time=0.001..0.001 rows=0 loops=4,220,246)

  • Index Cond: (animal.unit_id = animal_id)
19. 0.000 0.000 ↓ 0.0 0 4,220,246

Index Scan using colony_pkey on colony (cost=0.28..0.29 rows=1 width=17) (actual time=0.000..0.000 rows=0 loops=4,220,246)

  • Index Cond: (animal_transfer.colony_id = id)
20. 0.000 0.000 ↓ 0.0 0 4,220,246

Index Scan using idx_cage_location_cage_position_id on cage_location location (cost=0.29..0.36 rows=1 width=65) (actual time=0.000..0.000 rows=0 loops=4,220,246)

  • Index Cond: (animal_transfer.cage_id = cage_position_id)
21. 8,440.481 8,440.492 ↑ 1.0 8 4,220,246

Materialize (cost=0.00..1.12 rows=8 width=19) (actual time=0.000..0.002 rows=8 loops=4,220,246)

22. 0.011 0.011 ↑ 1.0 8 1

Seq Scan on color color1 (cost=0.00..1.08 rows=8 width=19) (actual time=0.006..0.011 rows=8 loops=1)

23. 8,440.486 8,440.492 ↑ 1.0 8 4,220,246

Materialize (cost=0.00..1.12 rows=8 width=19) (actual time=0.000..0.002 rows=8 loops=4,220,246)

24. 0.006 0.006 ↑ 1.0 8 1

Seq Scan on color color2 (cost=0.00..1.08 rows=8 width=19) (actual time=0.002..0.006 rows=8 loops=1)

25. 4,220.241 4,220.246 ↑ 1.0 3 4,220,246

Materialize (cost=0.00..1.04 rows=3 width=13) (actual time=0.000..0.001 rows=3 loops=4,220,246)

26. 0.005 0.005 ↑ 1.0 3 1

Seq Scan on species (cost=0.00..1.03 rows=3 width=13) (actual time=0.004..0.005 rows=3 loops=1)

27. 0.000 0.000 ↑ 1.0 1 4,220,246

Materialize (cost=0.00..1.08 rows=1 width=20) (actual time=0.000..0.000 rows=1 loops=4,220,246)

28. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on disposition (cost=0.00..1.07 rows=1 width=20) (actual time=0.007..0.010 rows=1 loops=1)

  • Filter: ((short_name)::text ~~ 'Br%'::text)
  • Rows Removed by Filter: 5
29. 0.191 0.200 ↑ 1.0 6 100

Materialize (cost=0.00..1.09 rows=6 width=14) (actual time=0.000..0.002 rows=6 loops=100)

30. 0.009 0.009 ↑ 1.0 6 1

Seq Scan on reason_not_breedable "nonBreedableReason" (cost=0.00..1.06 rows=6 width=14) (actual time=0.007..0.009 rows=6 loops=1)

31. 0.287 0.300 ↑ 1.0 14 100

Materialize (cost=0.00..1.21 rows=14 width=20) (actual time=0.000..0.003 rows=14 loops=100)

32. 0.013 0.013 ↑ 1.0 14 1

Seq Scan on death_reason "deathReason" (cost=0.00..1.14 rows=14 width=20) (actual time=0.005..0.013 rows=14 loops=1)

33. 0.096 0.100 ↑ 1.0 2 100

Materialize (cost=0.00..1.03 rows=2 width=14) (actual time=0.000..0.001 rows=2 loops=100)

34. 0.004 0.004 ↑ 1.0 2 1

Seq Scan on harvest (cost=0.00..1.02 rows=2 width=14) (actual time=0.004..0.004 rows=2 loops=1)

35. 0.093 0.100 ↑ 1.0 3 100

Materialize (cost=0.00..1.04 rows=3 width=15) (actual time=0.000..0.001 rows=3 loops=100)

36. 0.007 0.007 ↑ 1.0 3 1

Seq Scan on gender (cost=0.00..1.03 rows=3 width=15) (actual time=0.005..0.007 rows=3 loops=1)

37. 0.093 0.100 ↑ 1.0 6 100

Materialize (cost=0.00..1.09 rows=6 width=19) (actual time=0.000..0.001 rows=6 loops=100)

38. 0.007 0.007 ↑ 1.0 6 1

Seq Scan on genotype_status "genotypeStatus" (cost=0.00..1.06 rows=6 width=19) (actual time=0.004..0.007 rows=6 loops=1)

39. 0.191 0.200 ↑ 1.0 7 100

Materialize (cost=0.00..1.10 rows=7 width=28) (actual time=0.000..0.002 rows=7 loops=100)

40. 0.009 0.009 ↑ 1.0 7 1

Seq Scan on source_type "sourceType" (cost=0.00..1.07 rows=7 width=28) (actual time=0.007..0.009 rows=7 loops=1)

41.          

SubPlan (forNested Loop Left Join)

42. 0.500 14.100 ↑ 1.0 1 100

Aggregate (cost=104.66..104.67 rows=1 width=32) (actual time=0.141..0.141 rows=1 loops=100)

43. 0.878 13.600 ↑ 1.0 10 100

Hash Join (cost=60.97..104.64 rows=10 width=12) (actual time=0.125..0.136 rows=10 loops=100)

  • Hash Cond: (tag_unit.tag_id = tag.id)
44. 11.800 11.800 ↑ 1.0 10 100

Index Scan using tag_unit_index on tag_unit (cost=0.43..43.95 rows=10 width=8) (actual time=0.114..0.118 rows=10 loops=100)

  • Index Cond: (unit_id = research_unit.id)
45. 0.449 0.922 ↑ 1.0 1,002 1

Hash (cost=48.02..48.02 rows=1,002 width=20) (actual time=0.922..0.922 rows=1,002 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 63kB
46. 0.473 0.473 ↑ 1.0 1,002 1

Seq Scan on tag (cost=0.00..48.02 rows=1,002 width=20) (actual time=0.008..0.473 rows=1,002 loops=1)

47. 0.300 6.800 ↑ 1.0 1 100

Limit (cost=9.59..9.60 rows=1 width=16) (actual time=0.066..0.068 rows=1 loops=100)

48. 0.400 6.500 ↑ 1.0 1 100

Sort (cost=9.59..9.60 rows=1 width=16) (actual time=0.065..0.065 rows=1 loops=100)

  • Sort Key: m.id
  • Sort Method: quicksort Memory: 25kB
49. 0.409 6.100 ↑ 1.0 1 100

Nested Loop (cost=0.43..9.58 rows=1 width=16) (actual time=0.057..0.061 rows=1 loops=100)

  • Join Filter: (m.type_id = t.id)
  • Rows Removed by Join Filter: 5
50. 5.400 5.400 ↑ 1.0 1 100

Index Scan using animal_marker_animal_id_type_id_key on animal_marker m (cost=0.43..8.45 rows=1 width=16) (actual time=0.053..0.054 rows=1 loops=100)

  • Index Cond: (animal_id = animal.id)
51. 0.291 0.291 ↑ 1.0 6 97

Seq Scan on marker_type t (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.003 rows=6 loops=97)

52. 0.300 1.500 ↑ 1.0 1 100

Limit (cost=9.59..9.60 rows=1 width=10) (actual time=0.013..0.015 rows=1 loops=100)

53. 0.300 1.200 ↑ 1.0 1 100

Sort (cost=9.59..9.60 rows=1 width=10) (actual time=0.012..0.012 rows=1 loops=100)

  • Sort Key: m_1.id
  • Sort Method: quicksort Memory: 25kB
54. 0.406 0.900 ↑ 1.0 1 100

Nested Loop (cost=0.43..9.58 rows=1 width=10) (actual time=0.005..0.009 rows=1 loops=100)

  • Join Filter: (m_1.type_id = t_1.id)
  • Rows Removed by Join Filter: 5
55. 0.300 0.300 ↑ 1.0 1 100

Index Scan using animal_marker_animal_id_type_id_key on animal_marker m_1 (cost=0.43..8.45 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=100)

  • Index Cond: (animal_id = animal.id)
56. 0.194 0.194 ↑ 1.0 6 97

Seq Scan on marker_type t_1 (cost=0.00..1.06 rows=6 width=10) (actual time=0.001..0.002 rows=6 loops=97)

57. 0.200 0.800 ↑ 1.0 1 100

Limit (cost=8.46..8.46 rows=1 width=10) (actual time=0.007..0.008 rows=1 loops=100)

58. 0.300 0.600 ↑ 1.0 1 100

Sort (cost=8.46..8.46 rows=1 width=10) (actual time=0.006..0.006 rows=1 loops=100)

  • Sort Key: m_2.id
  • Sort Method: quicksort Memory: 25kB
59. 0.300 0.300 ↑ 1.0 1 100

Index Scan using animal_marker_animal_id_type_id_key on animal_marker m_2 (cost=0.43..8.45 rows=1 width=10) (actual time=0.003..0.003 rows=1 loops=100)

  • Index Cond: (animal_id = animal.id)