explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uua3 : Winnings

Settings
# exclusive inclusive rows x rows loops node
1. 0.041 7,090.013 ↑ 1.0 25 1

Nested Loop (cost=16,827.54..16,898.40 rows=25 width=317) (actual time=2,834.152..7,090.013 rows=25 loops=1)

  • Output: winnings.id, winnings.user_wallet_id, winnings.entry_id, winnings.event_id, winnings.gamedrawresult_id, winnings.winnings, winnings.message, winnings.message_vars, winnings.created_at, auw.id, auw.user_id, auw.product_id, auw.game_id, auw.winnings, auw.vouchers, auw.points, auw.created_at, auw.updated_at, auw.kwikie_vouchers, auw.wager_amount, auw.free_credits, gp.id, gp.name, gp.slug, gp.status, gp.cost, gp.price, gp.description, gp.created_at, gp.updated_at, gp.voucher_price, gp.instructions
  • Buffers: shared hit=27737
2.          

CTE auth_userwallet_tmp

3. 0.120 0.120 ↑ 1.9 90 1

Index Scan using auth_userwallet_user_id on public.auth_userwallet (cost=0.43..141.38 rows=175 width=71) (actual time=0.020..0.120 rows=90 loops=1)

  • Output: auth_userwallet.id, auth_userwallet.user_id, auth_userwallet.product_id, auth_userwallet.game_id, auth_userwallet.winnings, auth_userwallet.vouchers, auth_userwallet.points, auth_userwallet.created_at, auth_userwallet.updated_at, auth_userwallet.kwikie_vouchers, auth_userwallet.wager_amount, auth_userwallet.free_credits
  • Index Cond: (auth_userwallet.user_id = 212438)
  • Buffers: shared hit=55
4.          

CTE last_25_winnings

5. 0.014 7,089.648 ↑ 1.0 25 1

Limit (cost=0.44..16,685.58 rows=25 width=147) (actual time=2,834.094..7,089.648 rows=25 loops=1)

  • Output: auth_userwinningslog.id, auth_userwinningslog.user_wallet_id, auth_userwinningslog.entry_id, auth_userwinningslog.event_id, auth_userwinningslog.gamedrawresult_id, auth_userwinningslog.winnings, auth_userwinningslog.message, auth_userwinningslog.message_vars, auth_userwinningslog.created_at
  • Buffers: shared hit=27587
6. 3,720.700 7,089.634 ↑ 6,948.8 25 1

Nested Loop Semi Join (cost=0.44..115,942,380.52 rows=173,721 width=147) (actual time=2,834.091..7,089.634 rows=25 loops=1)

  • Output: auth_userwinningslog.id, auth_userwinningslog.user_wallet_id, auth_userwinningslog.entry_id, auth_userwinningslog.event_id, auth_userwinningslog.gamedrawresult_id, auth_userwinningslog.winnings, auth_userwinningslog.message, auth_userwinningslog.message_vars, auth_userwinningslog.created_at
  • Join Filter: (auth_userwinningslog.user_wallet_id = auth_userwallet_tmp.id)
  • Rows Removed by Join Filter: 41420619
  • Buffers: shared hit=27587
7. 147.163 147.163 ↑ 63.3 460,253 1

Index Scan Backward using auth_userwinningslog_pkey on public.auth_userwinningslog (cost=0.44..1,178,212.21 rows=29,146,455 width=147) (actual time=0.055..147.163 rows=460,253 loops=1)

  • Output: auth_userwinningslog.id, auth_userwinningslog.user_wallet_id, auth_userwinningslog.entry_id, auth_userwinningslog.event_id, auth_userwinningslog.gamedrawresult_id, auth_userwinningslog.winnings, auth_userwinningslog.message, auth_userwinningslog.message_vars, auth_userwinningslog.created_at
  • Buffers: shared hit=27532
8. 3,221.771 3,221.771 ↑ 1.9 90 460,253

CTE Scan on auth_userwallet_tmp (cost=0.00..3.50 rows=175 width=4) (actual time=0.000..0.007 rows=90 loops=460,253)

  • Output: auth_userwallet_tmp.id, auth_userwallet_tmp.user_id, auth_userwallet_tmp.product_id, auth_userwallet_tmp.game_id, auth_userwallet_tmp.winnings, auth_userwallet_tmp.vouchers, auth_userwallet_tmp.points, auth_userwallet_tmp.created_at, auth_userwallet_tmp.updated_at, auth_userwallet_tmp.kwikie_vouchers, auth_userwallet_tmp.wager_amount, auth_userwallet_tmp.free_credits
  • Buffers: shared hit=55
9. 0.063 7,089.897 ↑ 1.0 25 1

Nested Loop (cost=0.43..67.13 rows=25 width=185) (actual time=2,834.133..7,089.897 rows=25 loops=1)

  • Output: winnings.id, winnings.user_wallet_id, winnings.entry_id, winnings.event_id, winnings.gamedrawresult_id, winnings.winnings, winnings.message, winnings.message_vars, winnings.created_at, auw.id, auw.user_id, auw.product_id, auw.game_id, auw.winnings, auw.vouchers, auw.points, auw.created_at, auw.updated_at, auw.kwikie_vouchers, auw.wager_amount, auw.free_credits
  • Buffers: shared hit=27687
10. 7,089.684 7,089.684 ↑ 1.0 25 1

CTE Scan on last_25_winnings winnings (cost=0.00..0.50 rows=25 width=114) (actual time=2,834.100..7,089.684 rows=25 loops=1)

  • Output: winnings.id, winnings.user_wallet_id, winnings.entry_id, winnings.event_id, winnings.gamedrawresult_id, winnings.winnings, winnings.message, winnings.message_vars, winnings.created_at
  • Buffers: shared hit=27587
11. 0.150 0.150 ↑ 1.0 1 25

Index Scan using auth_userwallet_pkey on public.auth_userwallet auw (cost=0.43..2.66 rows=1 width=71) (actual time=0.006..0.006 rows=1 loops=25)

  • Output: auw.id, auw.user_id, auw.product_id, auw.game_id, auw.winnings, auw.vouchers, auw.points, auw.created_at, auw.updated_at, auw.kwikie_vouchers, auw.wager_amount, auw.free_credits
  • Index Cond: (auw.id = winnings.user_wallet_id)
  • Buffers: shared hit=100
12. 0.075 0.075 ↑ 1.0 1 25

Index Scan using game_product_pkey on public.game_product gp (cost=0.14..0.16 rows=1 width=132) (actual time=0.003..0.003 rows=1 loops=25)

  • Output: gp.id, gp.name, gp.slug, gp.status, gp.cost, gp.price, gp.description, gp.created_at, gp.updated_at, gp.voucher_price, gp.instructions
  • Index Cond: (gp.id = auw.product_id)
  • Buffers: shared hit=50