explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jxXT : Optimization for: plan #UMOS

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.882 7.661 ↑ 310.5 16 1

HashAggregate (cost=4,204.26..4,316.04 rows=4,968 width=566) (actual time=7.637..7.661 rows=16 loops=1)

  • Group Key: location."Id", location_group_name."GroupName", (milk_recording."MilkingStopTime")::date
2. 2.943 5.779 ↑ 1.0 4,793 1

Hash Join (cost=8.97..4,154.58 rows=4,968 width=558) (actual time=0.030..5.779 rows=4,793 loops=1)

  • Hash Cond: (milk_recording."LocationId" = location."Id")
3. 2.821 2.821 ↑ 1.0 4,793 1

Index Scan using "IX_MilkRecordings_MilkingStopTime" on "MilkRecordings" milk_recording (cost=0.42..4,065.30 rows=4,968 width=32) (actual time=0.011..2.821 rows=4,793 loops=1)

  • Index Cond: (('2019-05-14 13:56:24+02'::timestamp with time zone - '72:00:00'::interval) <= "MilkingStopTime")
4. 0.002 0.015 ↑ 1.0 5 1

Hash (cost=8.48..8.48 rows=5 width=538) (actual time=0.014..0.015 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
5. 0.004 0.013 ↑ 1.0 5 1

Nested Loop (cost=0.14..8.48 rows=5 width=538) (actual time=0.008..0.013 rows=5 loops=1)

6. 0.004 0.004 ↑ 1.0 5 1

Seq Scan on "Locations" location (cost=0.00..1.05 rows=5 width=38) (actual time=0.004..0.004 rows=5 loops=1)

7. 0.005 0.005 ↑ 1.0 1 5

Index Scan using "PK_LocationGroupNames" on "LocationGroupNames" location_group_name (cost=0.14..1.48 rows=1 width=532) (actual time=0.001..0.001 rows=1 loops=5)

  • Index Cond: ("Id" = location."LocationGroupNameId")
Planning time : 0.366 ms
Execution time : 7.757 ms