explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yvSw

Settings
# exclusive inclusive rows x rows loops node
1. 7.934 575.191 ↓ 12.7 7,807 1

Nested Loop Left Join (cost=37.36..77,119.87 rows=617 width=182) (actual time=0.553..575.191 rows=7,807 loops=1)

2. 5.591 539.975 ↓ 7.4 4,547 1

Nested Loop Left Join (cost=36.93..63,009.95 rows=617 width=117) (actual time=0.532..539.975 rows=4,547 loops=1)

3. 27.987 516.196 ↓ 7.4 4,547 1

Nested Loop Left Join (cost=36.37..59,909.44 rows=617 width=109) (actual time=0.530..516.196 rows=4,547 loops=1)

4. 5.960 431.261 ↓ 4.0 2,476 1

Nested Loop Left Join (cost=35.93..29,869.55 rows=617 width=79) (actual time=0.517..431.261 rows=2,476 loops=1)

5. 3.646 351.591 ↓ 2.8 1,755 1

Nested Loop (cost=35.37..11,948.36 rows=617 width=50) (actual time=0.501..351.591 rows=1,755 loops=1)

6. 150.929 151.265 ↓ 2.3 1,788 1

Bitmap Heap Scan on "GroupMembershipRange" "GroupMembershipRanges" (cost=34.81..5,142.50 rows=793 width=28) (actual time=0.464..151.265 rows=1,788 loops=1)

  • Recheck Cond: ("groupId" = 14231)
  • Filter: ((("endDate" >= '2017-05-01 00:00:00+12'::timestamp with time zone) OR ("endDate" IS NULL)) AND ("startDate" < '2019-06-01 00:00:00+12'::timestamp with time zone))
  • Rows Removed by Filter: 907
  • Heap Blocks: exact=1041
7. 0.336 0.336 ↓ 2.0 2,728 1

Bitmap Index Scan on "GroupMembershipRangeGroupIdIndex" (cost=0.00..34.61 rows=1,356 width=0) (actual time=0.336..0.336 rows=2,728 loops=1)

  • Index Cond: ("groupId" = 14231)
8. 196.680 196.680 ↑ 1.0 1 1,788

Index Scan using "Animal_pkey" on "Animal" (cost=0.56..8.57 rows=1 width=26) (actual time=0.109..0.110 rows=1 loops=1,788)

  • Index Cond: (id = "GroupMembershipRanges"."animalId")
  • Filter: ((sex)::text = 'Female'::text)
  • Rows Removed by Filter: 0
9. 73.710 73.710 ↑ 7.0 1 1,755

Index Scan using "CalvingAnimalIdIndex" on "Calving" "Calvings" (cost=0.56..28.98 rows=7 width=33) (actual time=0.042..0.042 rows=1 loops=1,755)

  • Index Cond: ("Animal".id = "animalId")
  • Filter: (("dateOfOnFarmEvent" >= '2017-05-01 00:00:00+12'::timestamp with time zone) AND ("dateOfOnFarmEvent" < '2019-06-01 00:00:00+12'::timestamp with time zone))
  • Rows Removed by Filter: 1
10. 56.948 56.948 ↑ 5.5 2 2,476

Index Scan using "MatingAnimalIdIndex" on "Mating" "DamMatings" (cost=0.44..48.58 rows=11 width=30) (actual time=0.022..0.023 rows=2 loops=2,476)

  • Index Cond: ("Animal".id = "animalId")
  • Filter: (("dateOfOnFarmEvent" >= '2017-05-01 00:00:00+12'::timestamp with time zone) AND ("dateOfOnFarmEvent" < '2019-06-01 00:00:00+12'::timestamp with time zone))
  • Rows Removed by Filter: 1
11. 18.188 18.188 ↑ 1.0 1 4,547

Index Scan using "Animal_pkey" on "Animal" "DamMatings->Sire" (cost=0.56..5.02 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=4,547)

  • Index Cond: ("DamMatings"."mateId" = id)
12. 27.282 27.282 ↑ 3.5 2 4,547

Index Scan using "PregnancyDiagnosisAnimalIdIndex" on "PregnancyDiagnosis" "PregnancyDiagnoses" (cost=0.43..22.80 rows=7 width=65) (actual time=0.005..0.006 rows=2 loops=4,547)

  • Index Cond: ("Animal".id = "animalId")
  • Filter: (("dateOfOnFarmEvent" >= '2017-05-01 00:00:00+12'::timestamp with time zone) AND ("dateOfOnFarmEvent" < '2019-06-01 00:00:00+12'::timestamp with time zone))
  • Rows Removed by Filter: 1
Planning time : 1.213 ms
Execution time : 577.359 ms