explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UvN9

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.043 ↑ 1.0 1 1

Nested Loop (cost=1.14..14.12 rows=1 width=53) (actual time=0.042..0.043 rows=1 loops=1)

2. 0.005 0.033 ↑ 1.0 1 1

GroupAggregate (cost=0.57..5.51 rows=1 width=13) (actual time=0.033..0.033 rows=1 loops=1)

  • Group Key: musician_scores.attribute_code
3. 0.028 0.028 ↑ 6.2 5 1

Index Only Scan using idx_ms_musicid_createat on musician_scores (cost=0.57..5.34 rows=31 width=13) (actual time=0.020..0.028 rows=5 loops=1)

  • Index Cond: ((musician_id = 32) AND (attribute_code = 'yt01'::text) AND (created_at <= '2019-04-14 10:36:02+00'::timestamp with time zone) AND (created_at >= '2019-02-13 00:00:00'::timestamp without time zone))
  • Heap Fetches: 5
4. 0.006 0.006 ↑ 1.0 1 1

Index Scan using idx_ms_musicid_createat on musician_scores m (cost=0.57..8.59 rows=1 width=53) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: ((musician_id = 32) AND ((attribute_code)::text = (musician_scores.attribute_code)::text) AND (created_at = (max(musician_scores.created_at))))
Planning time : 0.316 ms
Execution time : 0.082 ms