explain.depesz.com

PostgreSQL's explain analyze made readable

Result: X0zY

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 0.667 ↑ 11.6 20 1

Nested Loop (cost=368.60..1,204.39 rows=232 width=183) (actual time=0.499..0.667 rows=20 loops=1)

2. 0.026 0.488 ↑ 11.6 20 1

HashAggregate (cost=368.03..370.35 rows=232 width=16) (actual time=0.480..0.488 rows=20 loops=1)

  • Group Key: first_value(merge_request_diffs_1.id) OVER (?)
3. 0.062 0.462 ↑ 5.5 42 1

WindowAgg (cost=362.81..367.45 rows=232 width=16) (actual time=0.406..0.462 rows=42 loops=1)

4. 0.400 0.400 ↑ 5.5 42 1

Sort (cost=362.81..363.39 rows=232 width=16) (actual time=0.395..0.400 rows=42 loops=1)

  • Sort Key: merge_request_diffs_1.merge_request_id, merge_request_diffs_1.created_at DESC
  • Sort Method: quicksort Memory: 26kB
  • -> Index Scan using index_merge_request_diffs_on_merge_request_id_and_id on merge_request_diffs merge_request_diffs_1 (cost=0.57..353.69 rows=232 width=16) (actual time=0.031..0.372 rows=4
  • Index Cond: (merge_request_id = ANY ('{74672729,74671284,74670720,74670050,74667320,74666241,74665211,74664673,74664391,74659727,74659453,74658415,74657110,74656781,74656119,74654621,7
5. 0.160 0.160 ↑ 1.0 1 20

Index Scan using merge_request_diffs_pkey on merge_request_diffs (cost=0.57..3.58 rows=1 width=183) (actual time=0.008..0.008 rows=1 loops=20)

  • Index Cond: (id = (first_value(merge_request_diffs_1.id) OVER (?)))
Planning time : 0.390 ms
Execution time : 0.800 ms