explain.depesz.com

PostgreSQL's explain analyze made readable

Result: j08 : promos

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

Unique (cost=5,354.87..5,355.84 rows=43 width=71) (actual time=40.587..40.587 rows=0 loops=1)

2. 0.021 40.587 ↓ 0.0 0 1

Sort (cost=5,354.87..5,354.98 rows=43 width=71) (actual time=40.587..40.587 rows=0 loops=1)

  • Sort Key: play_summary_sing.summary_date, play_summary_sing.server, play_summary_sing.casinoid, play_summary_sing.customerid, play_summary_sing.memberid, play_summary_sing.gameid, play_summary_sing.last_login_country_id, (CASE WHEN (play_summary_sing.summary_date < promotion_optins.promo_start_date) THEN 'Before Promo'::text WHEN (play_summary_sing.summary_date > promotion_optins.promo_end_date) THEN 'After Promo'::text ELSE 'During Promo'::text END)
  • Sort Method: quicksort Memory: 25kB
3. 0.019 40.566 ↓ 0.0 0 1

Hash Join (cost=4,603.27..5,353.71 rows=43 width=71) (actual time=40.566..40.566 rows=0 loops=1)

  • Hash Cond: ((c.game_id)::numeric = play_summary_sing.gameid)
4. 0.020 0.020 ↑ 8,514.0 1 1

Index Only Scan using games_idx on games_info c (cost=0.41..707.63 rows=8,514 width=4) (actual time=0.020..0.020 rows=1 loops=1)

  • Filter: ((game)::text <> ALL ('{"Sweet Bonanza","Aztec Gems","Sweet Bonanza Xmas","Wild West Gold","Fire Strike","The Dog House","Release the Kraken","Money Mouse","888 Dragons","Caishen''s Cash","Wolf Gold","Fire 88"}'::text[]))
  • Heap Fetches: 0
5. 0.000 40.527 ↓ 0.0 0 1

Hash (cost=4,602.85..4,602.85 rows=1 width=47) (actual time=40.527..40.527 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
6. 0.001 40.527 ↓ 0.0 0 1

Nested Loop (cost=1.52..4,602.85 rows=1 width=47) (actual time=40.527..40.527 rows=0 loops=1)

  • Join Filter: (((play_summary_sing.server)::text = (promotion_optins.server)::text) AND (play_summary_sing.casinoid = (promotion_optins.brand_id)::numeric) AND (play_summary_sing.customerid = (promotion_optins.platform_id)::numeric))
7. 0.002 40.526 ↓ 0.0 0 1

Nested Loop (cost=0.97..445.37 rows=1 width=54) (actual time=40.526..40.526 rows=0 loops=1)

8. 40.524 40.524 ↓ 0.0 0 1

Index Scan using play_summary_sing_idx on play_summary_sing (cost=0.56..2.79 rows=1 width=39) (actual time=40.524..40.524 rows=0 loops=1)

  • Index Cond: ((summary_date >= '2020-08-04'::date) AND (summary_date < '2020-08-05'::date) AND (currencyid = '154'::numeric))
9. 0.000 0.000 ↓ 0.0 0

Index Only Scan using brand_info_pk on brand_info cc (cost=0.41..442.57 rows=1 width=15) (never executed)

  • Index Cond: (server = (play_summary_sing.server)::text)
  • Filter: ((play_summary_sing.casinoid = (brand_id)::numeric) AND (play_summary_sing.customerid = (platform_id)::numeric))
  • Heap Fetches: 0
10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using promotion_optins_pk on promotion_optins (cost=0.55..4,157.46 rows=1 width=23) (never executed)

  • Index Cond: ((promo_name = 'To Be Number One'::text) AND (server = (cc.server)::text))
  • Filter: (((cc.brand_id)::numeric = (brand_id)::numeric) AND ((cc.platform_id)::numeric = (platform_id)::numeric))
  • Heap Fetches: 0
Planning time : 1.770 ms
Execution time : 40.747 ms