explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Euv6

Settings
# exclusive inclusive rows x rows loops node
1. 0.393 5.056 ↓ 0.0 0 1

HashAggregate (cost=2,071.02..2,081.97 rows=292 width=4) (actual time=5.056..5.056 rows=0 loops=1)

  • Group Key: merge_request_metrics.merge_request_id
  • Filter: (count(merge_request_metrics.merge_request_id) > 1)
  • Rows Removed by Filter: 1,001
2. 0.143 4.663 ↓ 1.1 1,001 1

Nested Loop (cost=149.52..2,066.64 rows=876 width=4) (actual time=2.397..4.663 rows=1,001 loops=1)

3. 0.532 2.518 ↓ 1.1 1,001 1

HashAggregate (cost=148.96..157.71 rows=875 width=4) (actual time=2.375..2.518 rows=1,001 loops=1)

  • Group Key: merge_request_metrics_1.merge_request_id
4. 1.986 1.986 ↓ 1.1 1,001 1

Index Scan using merge_request_metrics_pkey on merge_request_metrics merge_request_metrics_1 (cost=0.56..146.77 rows=875 width=4) (actual time=0.025..1.986 rows=1,001 loops=1)

  • Index Cond: ((id >= 15,925,818) AND (id < 15926834))
5. 2.002 2.002 ↑ 1.0 1 1,001

Index Only Scan using index_merge_request_metrics on merge_request_metrics (cost=0.56..2.17 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,001)

  • Index Cond: (merge_request_id = merge_request_metrics_1.merge_request_id)
  • Heap Fetches: 28
Planning time : 0.375 ms
Execution time : 5.147 ms