explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UkO0

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 558.756 ↑ 1.0 40 1

Limit (cost=67,720.28..67,724.95 rows=40 width=88) (actual time=558.735..558.756 rows=40 loops=1)

2. 29.574 582.088 ↑ 618.7 40 1

Gather Merge (cost=67,720.28..70,607.75 rows=24,748 width=88) (actual time=558.734..582.088 rows=40 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 20.080 552.514 ↑ 36.7 337 3 / 3

Sort (cost=66,720.26..66,751.19 rows=12,374 width=88) (actual time=552.470..552.514 rows=337 loops=3)

  • Sort Key: t.created_at DESC
  • Sort Method: quicksort Memory: 5,178kB
4. 67.089 532.434 ↓ 2.3 28,989 3 / 3

Nested Loop Left Join (cost=11,328.81..65,879.13 rows=12,374 width=88) (actual time=180.868..532.434 rows=28,989 loops=3)

5. 9.833 320.402 ↓ 2.3 28,989 3 / 3

Nested Loop (cost=11,328.38..48,111.49 rows=12,374 width=687) (actual time=180.790..320.402 rows=28,989 loops=3)

6. 28.630 223.601 ↓ 2.2 28,989 3 / 3

Hash Join (cost=11,328.09..39,185.50 rows=13,457 width=80) (actual time=180.726..223.601 rows=28,989 loops=3)

  • Hash Cond: ((e.uid)::text = (eo.event_uid)::text)
7. 16.087 18.400 ↑ 1.4 27,060 3 / 3

Parallel Bitmap Heap Scan on events_v2 e (cost=3,231.83..28,335.90 rows=37,411 width=33) (actual time=3.285..18.400 rows=27,060 loops=3)

  • Recheck Cond: (init_point_id = ANY ('{3337,31249392,77918439,50677385,33935738,45134433,5,31048375,33949580,45089315,14,20,10289611,89099974,44009457,25565607,45074279,45074285,31276267,31545800,3341,8,71904711,37534833,6,9851,3339,16,2,31289745,35633224,23381011,6041,11,9837,24,89099969,15564683,31289741,77918440,77918441,43994469,46242075,33935735,32893134,31289740,62771745,15,8269152,4,9790310,46242072,50661657,32879486,12,31048376,6821844,37534836,19944229,46242073,37534835,68403069,31276270,31289734,31276271,3088539,120065980,31559341,43949531,16932574,33935739,31559332,71904712,37520704,16932573,46242063,46242066,25,74404560,50677383,33935736,68727005,62379851,4746,27,74404559,33935733,46242070,31289737,19,7,31289739,37534832,1,23,18,89099975,74804035,23381010,71904713,33949582,89099978,77566940,72464520,33949581,3455,44009459,46242067,3340,21,16233,71904708,71904710,68727006,28,29570928,33935734,71904709,31289732,89099979,50708850,32879487,37534831,9790308,46257354,32879483,25565605,45074276,9,31559335,54901057,13,5683,16932572,25565606,46242069,74804036,11841881,10,4597,20721486,12124137,31276280,31289738,31559323,23393397,26,31048378,20721485,43964497,33935737,37534834,31262830,22,31222544,3,3338,46242071,45089314,31276281,5209,33234808,31545799,31303216,31048377,89099977,43994470,72464519,5255,25565604,17,45029225,89099973,31559339,3454,31249395,31289742,120062930,31249393,31559342,31559328,31559344}'::bigint[]))
  • Heap Blocks: exact=1,888
8. 2.313 2.313 ↑ 1.1 81,181 1 / 3

Bitmap Index Scan on idx_views_events_v2_init_point_id (cost=0.00..3,209.38 rows=89,786 width=0) (actual time=6.939..6.939 rows=81,181 loops=1)

  • Index Cond: (init_point_id = ANY ('{3337,31249392,77918439,50677385,33935738,45134433,5,31048375,33949580,45089315,14,20,10289611,89099974,44009457,25565607,45074279,45074285,31276267,31545800,3341,8,71904711,37534833,6,9851,3339,16,2,31289745,35633224,23381011,6041,11,9837,24,89099969,15564683,31289741,77918440,77918441,43994469,46242075,33935735,32893134,31289740,62771745,15,8269152,4,9790310,46242072,50661657,32879486,12,31048376,6821844,37534836,19944229,46242073,37534835,68403069,31276270,31289734,31276271,3088539,120065980,31559341,43949531,16932574,33935739,31559332,71904712,37520704,16932573,46242063,46242066,25,74404560,50677383,33935736,68727005,62379851,4746,27,74404559,33935733,46242070,31289737,19,7,31289739,37534832,1,23,18,89099975,74804035,23381010,71904713,33949582,89099978,77566940,72464520,33949581,3455,44009459,46242067,3340,21,16233,71904708,71904710,68727006,28,29570928,33935734,71904709,31289732,89099979,50708850,32879487,37534831,9790308,46257354,32879483,25565605,45074276,9,31559335,54901057,13,5683,16932572,25565606,46242069,74804036,11841881,10,4597,20721486,12124137,31276280,31289738,31559323,23393397,26,31048378,20721485,43964497,33935737,37534834,31262830,22,31222544,3,3338,46242071,45089314,31276281,5209,33234808,31545799,31303216,31048377,89099977,43994470,72464519,5255,25565604,17,45029225,89099973,31559339,3454,31249395,31289742,120062930,31249393,31559342,31559328,31559344}'::bigint[]))
9. 45.011 176.571 ↑ 1.0 89,421 3 / 3

Hash (cost=6,974.32..6,974.32 rows=89,755 width=113) (actual time=176.571..176.571 rows=89,421 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 14,385kB
10. 58.886 131.560 ↑ 1.0 89,421 3 / 3

Hash Join (cost=3,321.93..6,974.32 rows=89,755 width=113) (actual time=58.038..131.560 rows=89,421 loops=3)

  • Hash Cond: (eo.order_id = t.id)
11. 16.054 16.054 ↓ 1.0 100,772 3 / 3

Seq Scan on event_orders eo (cost=0.00..3,389.28 rows=100,228 width=41) (actual time=0.023..16.054 rows=100,772 loops=3)

12. 30.563 56.620 ↓ 1.0 85,317 3 / 3

Hash (cost=2,284.19..2,284.19 rows=83,019 width=72) (actual time=56.620..56.620 rows=85,317 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 10,036kB
13. 26.057 26.057 ↓ 1.0 85,317 3 / 3

Seq Scan on order_v2 t (cost=0.00..2,284.19 rows=83,019 width=72) (actual time=0.018..26.057 rows=85,317 loops=3)

14. 86.968 86.968 ↑ 1.0 1 86,968 / 3

Index Scan using idx_route_order_id on route r (cost=0.29..0.65 rows=1 width=623) (actual time=0.003..0.003 rows=1 loops=86,968)

  • Index Cond: (order_id = eo.order_id)
15. 144.943 144.943 ↑ 1.0 1 86,966 / 3

Index Scan using idx_point_attribute_point_id on point_attribute pa (cost=0.43..1.41 rows=1 width=41) (actual time=0.003..0.005 rows=1 loops=86,966)

  • Index Cond: (point_id = (((r.data -> 0) ->> 'PointID'::text))::bigint)
  • Filter: ((key)::text = 'utc_offset'::text)
  • Rows Removed by Filter: 5
Planning time : 2.985 ms
Execution time : 582.503 ms