explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B5fr

Settings
# exclusive inclusive rows x rows loops node
1. 1,196.188 248,744.756 ↑ 11.0 1,118,832 1

Unique (cost=8,147,248.73..8,316,966.08 rows=12,343,000 width=64) (actual time=239,620.915..248,744.756 rows=1,118,832 loops=1)

2. 75,706.906 247,548.568 ↑ 1.3 17,637,918 1

Sort (cost=8,147,248.73..8,203,821.18 rows=22,628,980 width=64) (actual time=239,620.914..247,548.568 rows=17,637,918 loops=1)

  • Sort Key: t2_4.device_id, t1.user_id, t2_4."timestamp" DESC
  • Sort Method: external merge Disk: 1,346,872kB
3. 3,477.074 171,841.662 ↑ 1.3 17,637,918 1

Gather (cost=656,690.37..4,386,281.57 rows=22,628,980 width=64) (actual time=166,003.469..171,841.662 rows=17,637,918 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
4. 5,345.620 168,364.588 ↑ 1.5 2,519,703 7 / 7

Parallel Hash Join (cost=655,690.37..2,122,383.57 rows=3,771,497 width=64) (actual time=165,946.727..168,364.588 rows=2,519,703 loops=7)

  • Hash Cond: (t1.user_id = t3.user_id)
5. 55,768.516 154,074.841 ↑ 1.5 2,519,772 7 / 7

Parallel Hash Join (cost=462,431.55..1,919,224.47 rows=3,771,497 width=56) (actual time=137,450.732..154,074.841 rows=2,519,772 loops=7)

  • Hash Cond: (t2_4.session_id = t1.session_id)
6. 344.438 70,146.587 ↑ 1.2 2,960,039 7 / 7

Parallel Append (cost=0.00..1,279,475.98 rows=3,453,777 width=110) (actual time=7.302..70,146.587 rows=2,960,039 loops=7)

7. 43,809.446 43,809.446 ↑ 1.2 940,426 7 / 7

Parallel Seq Scan on session_2020_2 t2_4 (cost=0.00..400,967.72 rows=1,097,177 width=117) (actual time=1.949..43,809.446 rows=940,426 loops=7)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
  • Rows Removed by Filter: 12
8. 7,593.921 7,593.921 ↓ 1.5 1,142,879 4 / 7

Parallel Seq Scan on session_2018 t2_1 (cost=0.00..276,875.86 rows=762,105 width=101) (actual time=2.661..13,289.362 rows=1,142,879 loops=4)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
  • Rows Removed by Filter: 464
9. 8,171.301 8,171.301 ↓ 1.7 1,396,242 3 / 7

Parallel Seq Scan on session_2019 t2_2 (cost=0.00..256,949.02 rows=837,906 width=111) (actual time=5.814..19,066.369 rows=1,396,242 loops=3)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
  • Rows Removed by Filter: 428
10. 3,029.251 3,029.251 ↓ 2.5 1,189,593 2 / 7

Parallel Seq Scan on session_2020_1 t2_3 (cost=0.00..145,905.03 rows=475,842 width=114) (actual time=4.952..10,602.380 rows=1,189,593 loops=2)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
  • Rows Removed by Filter: 14
11. 4,175.101 4,175.101 ↓ 2.5 1,056,312 2 / 7

Parallel Seq Scan on session_2020_3 t2_5 (cost=0.00..129,562.57 rows=422,525 width=112) (actual time=3.228..14,612.853 rows=1,056,312 loops=2)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
  • Rows Removed by Filter: 2
12. 3,021.690 3,021.690 ↓ 2.0 442,520 2 / 7

Parallel Seq Scan on session_2017 t2 (cost=0.00..51,908.50 rows=221,284 width=82) (actual time=2.698..10,575.916 rows=442,520 loops=2)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
  • Rows Removed by Filter: 920
13. 0.472 0.472 ↓ 1.7 195 1 / 7

Parallel Seq Scan on session_def t2_11 (cost=0.00..13.44 rows=115 width=87) (actual time=1.145..3.306 rows=195 loops=1)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
  • Rows Removed by Filter: 1
14. 0.000 0.000 ↓ 0.0 0 1 / 7

Parallel Seq Scan on session_2021_3 t2_9 (cost=0.00..10.96 rows=76 width=136) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
15. 0.000 0.000 ↓ 0.0 0 1 / 7

Parallel Seq Scan on session_2021_4 t2_10 (cost=0.00..10.96 rows=76 width=136) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
16. 0.122 0.122 ↓ 1.5 3 1 / 7

Parallel Seq Scan on session_2020_4 t2_6 (cost=0.00..1.02 rows=2 width=136) (actual time=0.852..0.857 rows=3 loops=1)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
17. 0.217 0.217 ↑ 1.0 1 1 / 7

Parallel Seq Scan on session_2021_1 t2_7 (cost=0.00..1.01 rows=1 width=136) (actual time=1.520..1.520 rows=1 loops=1)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
18. 0.626 0.626 ↑ 1.0 1 1 / 7

Parallel Seq Scan on session_2021_2 t2_8 (cost=0.00..1.01 rows=1 width=136) (actual time=4.379..4.380 rows=1 loops=1)

  • Filter: (app_version !~ '^(?:.*dev.*|.*local.*)$'::text)
19. 10,750.339 28,159.738 ↑ 1.2 2,542,745 7 / 7

Parallel Hash (cost=390,579.80..390,579.80 rows=2,966,780 width=70) (actual time=28,159.737..28,159.738 rows=2,542,745 loops=7)

  • Buckets: 131,072 Batches: 512 Memory Usage: 4,768kB
20. 17,409.399 17,409.399 ↑ 1.2 2,542,745 7 / 7

Parallel Seq Scan on login t1 (cost=0.00..390,579.80 rows=2,966,780 width=70) (actual time=6.467..17,409.399 rows=2,542,745 loops=7)

21. 3,396.097 8,944.127 ↓ 3.7 279,992 7 / 7

Parallel Hash (cost=192,301.14..192,301.14 rows=76,614 width=16) (actual time=8,944.127..8,944.127 rows=279,992 loops=7)

  • Buckets: 262,144 (originally 524288) Batches: 16 (originally 1) Memory Usage: 6,976kB
22. 5,548.030 5,548.030 ↓ 3.7 279,992 7 / 7

Parallel Seq Scan on etl_dim_ums_users t3 (cost=0.00..192,301.14 rows=76,614 width=16) (actual time=1,216.514..5,548.030 rows=279,992 loops=7)

Planning time : 1.788 ms