explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5eBe

Settings
# exclusive inclusive rows x rows loops node
1. 1.615 1,898.652 ↓ 2,637.0 2,637 1

GroupAggregate (cost=128,459.72..128,459.76 rows=1 width=79) (actual time=1,896.941..1,898.652 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. 3.586 1,897.037 ↓ 2,637.0 2,637 1

Sort (cost=128,459.72..128,459.72 rows=1 width=39) (actual time=1,896.925..1,897.037 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: 303kB
3. 0.989 1,893.451 ↓ 2,637.0 2,637 1

Nested Loop (cost=1,001.13..128,459.71 rows=1 width=39) (actual time=89.130..1,893.451 rows=2,637 loops=1)

4. 69.429 1,889.825 ↓ 2,637.0 2,637 1

Gather (cost=1,000.85..128,455.40 rows=1 width=35) (actual time=89.118..1,889.825 rows=2,637 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
5. 50.436 1,820.396 ↓ 1,318.0 1,318 2 / 2

Nested Loop (cost=0.85..127,455.30 rows=1 width=35) (actual time=989.788..1,820.396 rows=1,318 loops=2)

6. 12.908 1,641.001 ↓ 1,057.0 128,958 2 / 2

Nested Loop (cost=0.57..127,418.31 rows=122 width=35) (actual time=624.338..1,641.001 rows=128,958 loops=2)

7. 7.855 7.855 ↑ 1.0 2 2 / 2

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

  • Filter: (channel_id = 259)
  • Rows Removed by Filter: 5,724
8. 1,620.238 1,620.238 ↓ 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,285.33 rows=22,795 width=35) (actual time=272.453..648.095 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))
9. 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
10. 2.637 2.637 ↑ 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.001..0.001 rows=1 loops=2,637)

  • Index Cond: (id = 4,169)
Planning time : 0.604 ms
Execution time : 1,898.847 ms