explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vWIw

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=202,280.17..202,280.37 rows=1 width=87) (actual rows= loops=)

  • 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. 0.000 0.000 ↓ 0.0

Gather Merge (cost=202,280.17..202,280.32 rows=1 width=87) (actual rows= loops=)

  • Workers Planned: 1
3. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=201,280.16..201,280.20 rows=1 width=87) (actual rows= loops=)

  • 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
4. 0.000 0.000 ↓ 0.0

Sort (cost=201,280.16..201,280.16 rows=1 width=43) (actual rows= loops=)

  • Sort Key: stats_adrevenue.date, stats_adrevenue.country, core_app.customer_id, stats_adrevenue.ad_unit_map_id
5. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=201,106.43..201,280.15 rows=1 width=43) (actual rows= loops=)

  • Merge Cond: ((stats_adrevenue.date = stats_general_regular.date) AND ((stats_adrevenue.country)::text = (stats_general_regular.country)::text))
  • Join Filter: (core_app.id = stats_general_regular.app_id)
6. 0.000 0.000 ↓ 0.0

Sort (cost=127,459.62..127,459.62 rows=1 width=43) (actual rows= loops=)

  • Sort Key: stats_adrevenue.date, stats_adrevenue.country
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..127,459.61 rows=1 width=43) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..127,455.30 rows=1 width=35) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..127,418.31 rows=122 width=35) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

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

  • Filter: (channel_id = 259)
11. 0.000 0.000 ↓ 0.0

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 rows= loops=)

  • Index Cond: ((date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date) AND (connected_channel_id = core_connectedchannel.id))
12. 0.000 0.000 ↓ 0.0

Index Scan using core_adrevenue_app_map_pkey on core_adrevenue_app_map (cost=0.28..0.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = stats_adrevenue.app_map_id)
  • Filter: (app_id = 4,169)
13. 0.000 0.000 ↓ 0.0

Index Scan using core_app_pkey on core_app (cost=0.28..4.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = 4,169)
14. 0.000 0.000 ↓ 0.0

Materialize (cost=73,646.82..73,813.44 rows=1,413 width=14) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=73,646.82..73,795.78 rows=1,413 width=14) (actual rows= loops=)

  • Group Key: stats_general_regular.date, stats_general_regular.app_id, stats_general_regular.country
16. 0.000 0.000 ↓ 0.0

Sort (cost=73,646.82..73,673.08 rows=10,504 width=18) (actual rows= loops=)

  • Sort Key: stats_general_regular.date, stats_general_regular.country
17. 0.000 0.000 ↓ 0.0

Append (cost=51,905.74..72,945.22 rows=10,504 width=18) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on stats_general_regular (cost=51,905.74..72,892.70 rows=10,504 width=18) (actual rows= loops=)

  • Recheck Cond: ((customer_id = 857) AND (date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date) AND (app_id = 4,169))
19. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=51,905.74..51,905.74 rows=10,504 width=0) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on stats_general_regular_customer_date_idx (cost=0.00..19,260.77 rows=900,336 width=0) (actual rows= loops=)

  • Index Cond: ((customer_id = 857) AND (date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on stats_general_regular_app_idx (cost=0.00..32,639.47 rows=1,685,987 width=0) (actual rows= loops=)

  • Index Cond: (app_id = 4,169)