explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QGvC

Settings
# exclusive inclusive rows x rows loops node
1. 5.480 73.147 ↓ 12.7 7,807 1

Nested Loop Left Join (cost=37.36..77,119.87 rows=617 width=117) (actual time=0.483..73.147 rows=7,807 loops=1)

2. 5.471 54.026 ↓ 7.4 4,547 1

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

3. 4.494 39.461 ↓ 7.4 4,547 1

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

4. 2.075 27.539 ↓ 4.0 2,476 1

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

5. 2.041 18.444 ↓ 2.8 1,755 1

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

6. 3.621 3.887 ↓ 2.3 1,788 1

Bitmap Heap Scan on "GroupMembershipRange" "GroupMembershipRanges" (cost=34.81..5,142.50 rows=793 width=28) (actual time=0.442..3.887 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.266 0.266 ↓ 2.0 2,728 1

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

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

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

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

Index Scan using "CalvingAnimalIdIndex" on "Calving" "Calvings" (cost=0.56..28.98 rows=7 width=33) (actual time=0.004..0.004 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. 7.428 7.428 ↑ 5.5 2 2,476

Index Scan using "MatingAnimalIdIndex" on "Mating" "DamMatings" (cost=0.44..48.58 rows=11 width=30) (actual time=0.002..0.003 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. 9.094 9.094 ↑ 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.002..0.002 rows=1 loops=4,547)

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

Index Scan using "PregnancyDiagnosisAnimalIdIndex" on "PregnancyDiagnosis" "PregnancyDiagnoses" (cost=0.43..22.80 rows=7 width=4) (actual time=0.002..0.003 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