explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uGkZ

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

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

2. 28.790 563.873 ↑ 618.7 40 1

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

  • Workers Planned: 2
  • Workers Launched: 2
3. 18.188 535.083 ↑ 34.4 360 3 / 3

Sort (cost=66,720.26..66,751.19 rows=12,374 width=88) (actual time=535.043..535.083 rows=360 loops=3)

  • Sort Key: t.created_at DESC
  • Sort Method: quicksort Memory: 5,060kB
4. 70.245 516.895 ↓ 2.3 28,989 3 / 3

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

5. 6.136 301.707 ↓ 2.3 28,989 3 / 3

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

6. 27.574 208.603 ↓ 2.2 28,989 3 / 3

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

  • Hash Cond: ((e.uid)::text = (eo.event_uid)::text)
7. 15.464 17.874 ↑ 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.560..17.874 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=2,027
8. 2.410 2.410 ↑ 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=7.229..7.229 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. 43.308 163.155 ↑ 1.0 89,421 3 / 3

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

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

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

  • Hash Cond: (eo.order_id = t.id)
11. 14.081 14.081 ↓ 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..14.081 rows=100,772 loops=3)

12. 30.384 52.454 ↓ 1.0 85,317 3 / 3

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

  • Buckets: 131,072 Batches: 1 Memory Usage: 10,036kB
13. 22.070 22.070 ↓ 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.017..22.070 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.004..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 : 3.178 ms
Execution time : 564.365 ms