explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bLQv

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

GroupAggregate (cost=509,177.04..509,210.74 rows=793 width=87) (actual time=0.019..0.019 rows=0 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. 0.003 0.018 ↓ 0.0 0 1

Sort (cost=509,177.04..509,179.02 rows=793 width=43) (actual time=0.018..0.018 rows=0 loops=1)

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

Hash Left Join (cost=376,451.18..509,138.85 rows=793 width=43) (actual time=0.015..0.015 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.000 0.014 ↓ 0.0 0 1

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

5. 0.000 0.014 ↓ 0.0 0 1

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

6. 0.000 0.014 ↓ 0.0 0 1

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

7. 0.009 0.009 ↑ 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.008..0.009 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=360,326.45..360,326.45 rows=1,413 width=14) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Subquery Scan on sq0 (cost=360,239.66..360,326.45 rows=1,413 width=14) (never executed)

16. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=360,239.66..360,312.32 rows=1,413 width=14) (never executed)

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

Sort (cost=360,239.66..360,250.66 rows=4,400 width=18) (never executed)

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

Append (cost=0.57..359,973.39 rows=4,400 width=18) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Index Scan using stats_general_regular_customer_date_idx on stats_general_regular (cost=0.57..135.75 rows=1 width=18) (never executed)

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

Index Scan using stats_general_important_hutchgames_unique on stats_general_important_hutchgames (cost=0.56..359,815.63 rows=4,399 width=18) (never executed)

  • Index Cond: ((customer_id = 317) AND (date >= '2020-07-26'::date) AND (date <= '2020-07-27'::date))
  • Filter: (app_id = 2,452)
Planning time : 1.776 ms
Execution time : 0.110 ms