explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9NzS

Settings
# exclusive inclusive rows x rows loops node
1. 1.719 4,442,976.583 ↓ 2,637.0 2,637 1

GroupAggregate (cost=2,880,156.43..2,880,156.48 rows=1 width=87) (actual time=4,442,974.770..4,442,976.583 rows=2,637 loops=1)

  • Group Key: stats_adrevenue.date, stats_adrevenue.country, core_adrevenue_app_map.app_id, core_app.customer_id, core_connectedchannel.channel_id, stats_adrevenue.ad_unit_map_id
2. 7.422 4,442,974.864 ↓ 2,637.0 2,637 1

Sort (cost=2,880,156.43..2,880,156.44 rows=1 width=43) (actual time=4,442,974.755..4,442,974.864 rows=2,637 loops=1)

  • Sort Key: stats_adrevenue.date, stats_adrevenue.country, core_app.customer_id, stats_adrevenue.ad_unit_map_id
  • Sort Method: quicksort Memory: 322kB
3. 12,195.240 4,442,967.442 ↓ 2,637.0 2,637 1

Nested Loop Left Join (cost=2,751,546.58..2,880,156.42 rows=1 width=43) (actual time=4,944.698..4,442,967.442 rows=2,637 loops=1)

  • Join Filter: ((core_app.id = stats_general_regular.app_id) AND (stats_adrevenue.date = stats_general_regular.date) AND ((stats_adrevenue.country)::text = (stats_general_regular.country)::text))
  • Rows Removed by Join Filter: 623,936
4. 7.081 2,239.231 ↓ 2,637.0 2,637 1

Nested Loop (cost=1,001.13..128,443.71 rows=1 width=43) (actual time=2,200.139..2,239.231 rows=2,637 loops=1)

5. 0.000 2,203.143 ↓ 2,637.0 2,637 1

Gather (cost=1,000.85..128,439.40 rows=1 width=35) (actual time=2,200.124..2,203.143 rows=2,637 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
6. 76.437 3,146.765 ↓ 1,318.0 1,318 2 / 2

Nested Loop (cost=0.85..127,439.30 rows=1 width=35) (actual time=1,144.161..3,146.765 rows=1,318 loops=2)

7. 12.903 2,941.369 ↓ 1,057.0 128,958 2 / 2

Nested Loop (cost=0.57..127,402.31 rows=122 width=35) (actual time=763.903..2,941.369 rows=128,958 loops=2)

8. 9.938 9.938 ↑ 1.0 2 2 / 2

Parallel Seq Scan on core_connectedchannel (cost=0.00..2,391.76 rows=2 width=8) (actual time=2.741..9.938 rows=2 loops=2)

  • Filter: (channel_id = 259)
  • Rows Removed by Filter: 5,724
9. 2,918.528 2,918.528 ↓ 2.3 51,583 5 / 2

Index Scan using stats_adrevenue_date_app_map_id_connecte_6b5281f1_uniq on stats_adrevenue (cost=0.57..62,277.33 rows=22,795 width=35) (actual time=341.618..1,167.411 rows=51,583 loops=5)

  • Index Cond: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date) AND (connected_channel_id = core_connectedchannel.id))
10. 128.959 128.959 ↓ 0.0 0 257,917 / 2

Index Scan using core_adrevenue_app_map_pkey on core_adrevenue_app_map (cost=0.28..0.30 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=257,917)

  • Index Cond: (id = stats_adrevenue.app_map_id)
  • Filter: (app_id = 4,169)
  • Rows Removed by Filter: 1
11. 29.007 29.007 ↑ 1.0 1 2,637

Index Scan using core_app_pkey on core_app (cost=0.28..4.30 rows=1 width=8) (actual time=0.009..0.011 rows=1 loops=2,637)

  • Index Cond: (id = 4,169)
12. 424.557 4,428,532.971 ↑ 8.2 238 2,637

Finalize GroupAggregate (cost=2,750,545.45..2,751,659.01 rows=1,953 width=14) (actual time=1,678.571..1,679.383 rows=238 loops=2,637)

  • Group Key: stats_general_regular.date, stats_general_regular.app_id, stats_general_regular.country
13. 13,952.280 4,428,108.414 ↑ 7.2 1,089 2,637

Gather Merge (cost=2,750,545.45..2,751,556.48 rows=7,812 width=18) (actual time=1,678.559..1,679.222 rows=1,089 loops=2,637)

  • Workers Planned: 4
  • Workers Launched: 4
14. 914.970 4,414,156.134 ↑ 5.7 345 13,184 / 5

Partial GroupAggregate (cost=2,749,545.39..2,749,625.93 rows=1,953 width=18) (actual time=1,673.627..1,674.058 rows=345 loops=13,184)

  • Group Key: stats_general_regular.date, stats_general_regular.app_id, stats_general_regular.country
15. 6,365.235 4,413,241.165 ↑ 2.3 2,154 13,184 / 5

Sort (cost=2,749,545.39..2,749,557.59 rows=4,881 width=18) (actual time=1,673.616..1,673.711 rows=2,154 loops=13,184)

  • Sort Key: stats_general_regular.date, stats_general_regular.country
  • Sort Method: quicksort Memory: 314kB
  • Worker 0: Sort Method: quicksort Memory: 314kB
  • Worker 1: Sort Method: quicksort Memory: 309kB
  • Worker 2: Sort Method: quicksort Memory: 320kB
  • Worker 3: Sort Method: quicksort Memory: 276kB
16. 408.174 4,406,875.930 ↑ 1.8 2,690 13,184 / 5

Parallel Append (cost=0.56..2,749,246.36 rows=4,881 width=18) (actual time=1,548.533..1,671.297 rows=2,690 loops=13,184)

17. 4,261,502.900 4,406,432.947 ↑ 1.8 2,690 13,184 / 5

Parallel Bitmap Heap Scan on stats_general_regular (cost=31,203.95..2,740,174.29 rows=4,878 width=18) (actual time=1,548.516..1,671.129 rows=2,690 loops=13,184)

  • Recheck Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
  • Rows Removed by Filter: 312,627
  • Heap Blocks: exact=432,619,299
18. 144,930.047 144,930.047 ↓ 1.0 1,650,335 2,637 / 5

Bitmap Index Scan on stats_general_regular_app_idx (cost=0.00..31,199.07 rows=1,611,533 width=0) (actual time=274.801..274.801 rows=1,650,335 loops=2,637)

  • Index Cond: (app_id = 4,169)
19. 1.582 5.801 ↓ 0.0 0 2,637 / 5

Parallel Bitmap Heap Scan on stats_general_important_zeptolab (cost=217.01..219.02 rows=1 width=18) (actual time=0.011..0.011 rows=0 loops=2,637)

  • Recheck Cond: ((app_id = 4,169) AND (date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
20. 0.000 4.219 ↓ 0.0 0 2,637 / 5

BitmapAnd (cost=217.01..217.01 rows=1 width=0) (actual time=0.008..0.008 rows=0 loops=2,637)

21. 4.219 4.219 ↓ 0.0 0 2,637 / 5

Bitmap Index Scan on stats_general_important_zepto_app_idx (cost=0.00..23.95 rows=1,269 width=0) (actual time=0.008..0.008 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
22. 0.000 0.000 ↓ 0.0 0 / 5

Bitmap Index Scan on stats_general_important_zepto_unique (cost=0.00..192.81 rows=9,625 width=0) (never executed)

  • Index Cond: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
23. 3.692 3.692 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_smartnews_app_idx on stats_general_important_smartnews (cost=0.56..4.30 rows=1 width=18) (actual time=0.007..0.007 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
24. 5.801 5.801 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_slc_app_idx on stats_general_important_super_lucky_casino (cost=0.56..7,700.57 rows=5 width=18) (actual time=0.011..0.011 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
25. 5.801 5.801 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_melsoft_app_idx on stats_general_important_melsoft (cost=0.56..4.14 rows=1 width=18) (actual time=0.011..0.011 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
26. 5.274 5.274 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_hutch_app_idx on stats_general_important_hutchgames (cost=0.56..1,100.15 rows=2 width=18) (actual time=0.010..0.010 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
27. 1.582 1.582 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_zynga_app_idx on stats_general_important_zynga (cost=0.14..4.15 rows=1 width=28) (actual time=0.003..0.003 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
28. 1.055 1.055 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_playtika_app_idx on stats_general_important_playtika (cost=0.14..4.15 rows=1 width=28) (actual time=0.002..0.002 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
29. 1.582 1.582 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_pixonic_unique on stats_general_important_pixonic (cost=0.12..4.14 rows=1 width=18) (actual time=0.003..0.003 rows=0 loops=2,637)

  • Index Cond: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
  • Filter: (app_id = 4,169)
30. 1.582 1.582 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_moburst_app_idx on stats_general_important_moburst (cost=0.12..4.14 rows=1 width=18) (actual time=0.003..0.003 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
31. 2.637 2.637 ↓ 0.0 0 2,637 / 5

Parallel Index Scan using stats_general_important_dataduck_app_idx on stats_general_important_dataduck (cost=0.12..2.90 rows=1 width=18) (actual time=0.005..0.005 rows=0 loops=2,637)

  • Index Cond: (app_id = 4,169)
  • Filter: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
Planning time : 2.541 ms
Execution time : 4,442,999.896 ms