Thanx, I have imported this and created custom stat with the value
- Code: Select all
amt_won_in_buyins *100 / cnt_tourneys
and found this way is _too_ slow.
For 147 tourneys at yesterday is takes 22 sec,
For 649 tourneys at today is takes 98 sec
For 6463 tourneys at this month is takes 898 sec
For 23065 tourneys at this and previous month is wasn't enough 35 minutes. So I had to cancel the custom report and come see this info in SharkScope advanced query. So bad.
To get the custom stat report, the engine goes thru all the hands and tourneys, and counts the winning for each tourney. It is way too slow, because is contains clause
- Code: Select all
FROM tourney_hand_player_statistics , player, tourney_summary, tourney_results, player player_real
The execution time depends on a factor of dimensions of all these tables.
I believe table "tourney_hand_player_statistics" is redundant here. No need to look into each hand. Only tourney results matters. However, I understand its generated from a generic template that is universal and slow.
Full version
- Code: Select all
SELECT id_player, id_site, str_player_name, count(distinct cnt_tourneys), sum(amt_won_in_buyins) FROM ( SELECT (tourney_hand_player_statistics.id_player) as "id_player", (player_real.id_site) as "id_site", (player.player_name) as "str_player_name", ((tourney_summary.id_tourney)) as "cnt_tourneys", (( (CASE WHEN ( (tourney_summary.amt_buyin + tourney_summary.amt_fee + tourney_summary.amt_rebuy * tourney_results.cnt_rebuy + tourney_summary.amt_addon * tourney_results.cnt_addon + tourney_summary.amt_bounty) ) <> 0 THEN (( (tourney_results.amt_won - (tourney_summary.amt_buyin + tourney_summary.amt_fee + tourney_summary.amt_rebuy * tourney_results.cnt_rebuy + tourney_summary.amt_addon * tourney_results.cnt_addon + tourney_summary.amt_bounty)) * 1.0 )/( (tourney_summary.amt_buyin + tourney_summary.amt_fee + tourney_summary.amt_rebuy * tourney_results.cnt_rebuy + tourney_summary.amt_addon * tourney_results.cnt_addon + tourney_summary.amt_bounty) )) ELSE 0 END) )) as "amt_won_in_buyins" FROM tourney_hand_player_statistics , player, tourney_summary, tourney_results, player player_real WHERE (player.id_player = tourney_hand_player_statistics.id_player) AND (tourney_summary.id_tourney = tourney_hand_player_statistics.id_tourney) AND (tourney_results.id_tourney = tourney_hand_player_statistics.id_tourney AND tourney_results.id_player = tourney_hand_player_statistics.id_player) AND (player_real.id_player = tourney_hand_player_statistics.id_player_real) AND (player.id_player = tourney_results.id_player) AND (tourney_results.id_tourney = tourney_summary.id_tourney) AND (player_real.id_player = tourney_results.id_player_real) AND (tourney_results.id_player = (SELECT id_player FROM player WHERE player_name_search='HERO' AND id_site='100')) AND (((tourney_summary.date_start >= (to_char(current_timestamp - interval '24 hours', 'YYYY-MM-DD 00:00:00')::timestamp + INTERVAL '8 HOURS') AND tourney_summary.date_start <= (to_char(current_timestamp - interval '24 hours', 'YYYY-MM-DD 23:59:59')::timestamp + INTERVAL '8 HOURS')))) GROUP BY tourney_results.cnt_addon, tourney_results.cnt_rebuy, tourney_results.amt_won, tourney_summary.amt_bounty, tourney_summary.amt_addon, tourney_summary.amt_rebuy, tourney_summary.amt_fee, tourney_summary.amt_buyin, tourney_summary.id_tourney, (tourney_hand_player_statistics.id_player), (player_real.id_site), (player.player_name) ) AS tnySumGroup GROUP BY id_player, id_site, str_player_name
My tables have the following dimensions
- Code: Select all
select count (*) from tourney_hand_player_statistics
14490566
select count (*) from player
51428
select count (*) from tourney_summary
264901
select count (*) from tourney_results
1541284
So, I'd like to repeat my feature request.
It seems to be very useful to create new columns in View Stats/T/Results/Tournament/By buy-in
Let's look, Now we got columns
Buy-In
My C Buy-In
My C Net Won
Tournaments
ITM%
Avg Finish
1st place
2nd place
3rd place
Avg Players
Shouldn't be so hard to add columns to each row and the summary?
Buyins won = My C Net Won / Buy-In
ROI = Buyins won / Tournaments
It will greatly help to instantly estimate the estimation and variance of similar tourney series