explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 27uKr

Settings
# exclusive inclusive rows x rows loops node
1. 1.101 246.681 ↑ 2.3 2,949 1

Subquery Scan on unused (cost=294,839.63..295,439.63 rows=6,667 width=538) (actual time=230.809..246.681 rows=2,949 loops=1)

  • Filter: (unused.running_size <= 3,780,000)
  • Rows Removed by Filter: 17,051
2. 0.791 245.580 ↑ 1.0 20,000 1

Limit (cost=294,839.63..295,189.63 rows=20,000 width=546) (actual time=230.801..245.580 rows=20,000 loops=1)

3. 10.863 244.789 ↑ 6.2 20,000 1

WindowAgg (cost=294,839.63..297,020.19 rows=124,603 width=546) (actual time=230.800..244.789 rows=20,000 loops=1)

4. 36.399 233.926 ↑ 6.2 20,001 1

Sort (cost=294,839.63..295,151.14 rows=124,603 width=542) (actual time=230.772..233.926 rows=20,001 loops=1)

  • Sort Key: events.msg_offset
  • Sort Method: quicksort Memory: 36,331kB
5. 43.263 197.527 ↑ 3.7 33,794 1

Hash Join (cost=5,624.11..284,293.87 rows=124,603 width=542) (actual time=38.536..197.527 rows=33,794 loops=1)

  • Hash Cond: (events.cluster_id = clusters.cluster_id)
6. 125.267 154.246 ↑ 1.0 281,535 1

Bitmap Heap Scan on events (cost=5,622.47..281,971.50 rows=286,587 width=550) (actual time=38.502..154.246 rows=281,535 loops=1)

  • Recheck Cond: ((msg_offset >= 63,900,326) AND (msg_offset <= 64,182,340))
  • Filter: ((type)::text = ANY ('{prices-v1,reference-data-v5,product-base-document,search-product,location,selling-restrictions}'::text[]))
  • Rows Removed by Filter: 480
  • Heap Blocks: exact=50,520
7. 28.979 28.979 ↑ 1.0 282,015 1

Bitmap Index Scan on events_pkey (cost=0.00..5,550.82 rows=286,969 width=0) (actual time=28.979..28.979 rows=282,015 loops=1)

  • Index Cond: ((msg_offset >= 63,900,326) AND (msg_offset <= 64,182,340))
8. 0.004 0.018 ↑ 1.4 7 1

Hash (cost=1.52..1.52 rows=10 width=8) (actual time=0.018..0.018 rows=7 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 0.014 0.014 ↑ 1.4 7 1

Seq Scan on clusters (cost=0.00..1.52 rows=10 width=8) (actual time=0.006..0.014 rows=7 loops=1)

  • Filter: ((cluster_uuid)::text = ANY ('{NONE,417bda80-bfba-412c-9b52-c35d68530342,0ebc3b5d-81be-4f20-9c7d-022afe913356,05e7673f-b28d-491a-82b4-08a836112e2a,9938734d-6991-4497-aea4-68a8b1c40ffc,6c1b27c2-911d-4abf-be6b-6e043713f490,bfc03ffe-e78f-4aee-a2ec-b7b2c616dfa6,7293a0f2-bd28-4b73-b81c-5165d3ddded0,97b05cbb-897d-49ca-b338-330a38d3bd82,769d8c7f-8d92-4423-8f92-ab2331206ed6}'::text[]))
  • Rows Removed by Filter: 16
Planning time : 0.334 ms
Execution time : 252.234 ms