explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LYy8

Settings
# exclusive inclusive rows x rows loops node
1. 134.342 215.230 ↓ 0.0 0 1

Update on marks (cost=5,143.20..9,437.64 rows=500 width=244) (actual time=215.230..215.230 rows=0 loops=1)

2. 0.006 80.888 ↑ 500.0 1 1

Nested Loop (cost=5,143.20..9,437.64 rows=500 width=244) (actual time=80.880..80.888 rows=1 loops=1)

3. 0.013 38.197 ↑ 500.0 1 1

HashAggregate (cost=5,142.64..5,147.64 rows=500 width=32) (actual time=38.191..38.197 rows=1 loops=1)

  • Group Key: "ANY_subquery".id
4. 0.012 38.184 ↑ 500.0 1 1

Subquery Scan on ANY_subquery (cost=5,130.14..5,141.39 rows=500 width=32) (actual time=38.182..38.184 rows=1 loops=1)

5. 0.002 38.172 ↑ 500.0 1 1

Limit (cost=5,130.14..5,136.39 rows=500 width=10) (actual time=38.170..38.172 rows=1 loops=1)

6. 6.186 38.170 ↑ 1,286.0 1 1

LockRows (cost=5,130.14..5,146.21 rows=1,286 width=10) (actual time=38.169..38.170 rows=1 loops=1)

7. 0.018 31.984 ↑ 1,286.0 1 1

Sort (cost=5,130.14..5,133.35 rows=1,286 width=10) (actual time=31.975..31.984 rows=1 loops=1)

  • Sort Key: marks_1.id
  • Sort Method: quicksort Memory: 25kB
8. 0.016 31.966 ↑ 1,286.0 1 1

Bitmap Heap Scan on marks marks_1 (cost=33.74..5,066.06 rows=1,286 width=10) (actual time=31.965..31.966 rows=1 loops=1)

  • Recheck Cond: ((gtin_id = 11,122) AND (print_id IS NULL))
  • Heap Blocks: exact=1
9. 31.950 31.950 ↑ 1,286.0 1 1

Bitmap Index Scan on marks_gtin_id_print_id_id_index (cost=0.00..33.42 rows=1,286 width=0) (actual time=31.949..31.950 rows=1 loops=1)

  • Index Cond: ((gtin_id = 11,122) AND (print_id IS NULL))
10. 42.685 42.685 ↑ 1.0 1 1

Index Scan using marks_pk on marks (cost=0.56..8.58 rows=1 width=208) (actual time=42.685..42.685 rows=1 loops=1)

  • Index Cond: (id = "ANY_subquery".id)
Planning time : 27.865 ms
Execution time : 215.321 ms