explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jBZc

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.021 ↓ 0.0 0 1

GroupAggregate (cost=185,942.18..185,975.88 rows=793 width=87) (actual time=0.021..0.021 rows=0 loops=1)

  • Group Key: stats_adrevenue.date, stats_adrevenue.country, stats_adrevenue.ad_unit_map_id, core_adrevenue_app_map.app_id, core_app.customer_id, core_connectedchannel.channel_id
2. 0.004 0.020 ↓ 0.0 0 1

Sort (cost=185,942.18..185,944.16 rows=793 width=43) (actual time=0.020..0.020 rows=0 loops=1)

  • Sort Key: stats_adrevenue.date, stats_adrevenue.country, stats_adrevenue.ad_unit_map_id, core_app.customer_id, core_connectedchannel.channel_id
  • Sort Method: quicksort Memory: 25kB
3. 0.000 0.016 ↓ 0.0 0 1

Hash Left Join (cost=53,216.32..185,903.99 rows=793 width=43) (actual time=0.016..0.016 rows=0 loops=1)

  • Hash Cond: ((core_app.id = sq0.app_id) AND (stats_adrevenue.date = sq0.date) AND ((stats_adrevenue.country)::text = (sq0.country)::text))
4. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=16,100.00..148,781.43 rows=793 width=43) (actual time=0.016..0.016 rows=0 loops=1)

5. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=16,099.72..148,534.92 rows=793 width=43) (actual time=0.015..0.015 rows=0 loops=1)

6. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=0.56..21.40 rows=9 width=16) (actual time=0.015..0.015 rows=0 loops=1)

7. 0.010 0.010 ↑ 1.0 1 1

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

  • Index Cond: (id = 2,452)
8. 0.005 0.005 ↓ 0.0 0 1

Index Scan using core_adrevenue_app_map_app_id_a0995552 on core_adrevenue_app_map (cost=0.28..17.01 rows=9 width=8) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (app_id = 2,452)
9. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on stats_adrevenue (cost=16,099.16..16,499.51 rows=199 width=35) (never executed)

  • Recheck Cond: ((app_map_id = core_adrevenue_app_map.id) AND (date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
10. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=16,099.16..16,099.16 rows=199 width=0) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on stats_adrevenue_app_map_id_54a34d1e (cost=0.00..2,221.88 rows=84,500 width=0) (never executed)

  • Index Cond: (app_map_id = core_adrevenue_app_map.id)
12. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on stats_adrevenue_date_9c7168e0 (cost=0.00..13,732.97 rows=576,040 width=0) (never executed)

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

Index Scan using core_connectedchannel_pkey on core_connectedchannel (cost=0.29..0.31 rows=1 width=8) (never executed)

  • Index Cond: (id = stats_adrevenue.connected_channel_id)
14. 0.000 0.000 ↓ 0.0 0

Hash (cost=37,091.59..37,091.59 rows=1,413 width=14) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Subquery Scan on sq0 (cost=37,004.81..37,091.59 rows=1,413 width=14) (never executed)

16. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=37,004.81..37,077.46 rows=1,413 width=14) (never executed)

  • Group Key: stats_general_important_hutchgames.date, stats_general_important_hutchgames.app_id, stats_general_important_hutchgames.country
17. 0.000 0.000 ↓ 0.0 0

Sort (cost=37,004.81..37,015.81 rows=4,399 width=18) (never executed)

  • Sort Key: stats_general_important_hutchgames.date, stats_general_important_hutchgames.country
18. 0.000 0.000 ↓ 0.0 0

Append (cost=28,094.89..36,738.60 rows=4,399 width=18) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on stats_general_important_hutchgames (cost=28,094.89..36,716.61 rows=4,399 width=18) (never executed)

  • Recheck Cond: ((customer_id = 317) AND (date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date) AND (app_id = 2,452))
  • Filter: has_partition
20. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=28,094.89..28,094.89 rows=4,399 width=0) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on stats_general_important_hutchgames_unique (cost=0.00..1,873.71 rows=36,077 width=0) (never executed)

  • Index Cond: ((has_partition = true) AND (customer_id = 317) AND (date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
22. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on stats_general_important_hutch_app_idx (cost=0.00..26,218.72 rows=799,489 width=0) (never executed)

  • Index Cond: (app_id = 2,452)
Planning time : 1.685 ms
Execution time : 0.109 ms