Open Side Menu Go to the Top
Register
Script to analyze population tendency on HEM Script to analyze population tendency on HEM

06-25-2012 , 09:00 AM
@kasparovski what are you running HEM or HM2?
Script to analyze population tendency on HEM Quote
06-25-2012 , 12:07 PM
Making Database backup you guys mean just export hands or other method?
Script to analyze population tendency on HEM Quote
06-25-2012 , 12:22 PM
hand export will do, as in you'll be able to recreate a database - but it's super slow. I'd use pg_dump + pg_restore, I think they're made easily accessible available in the pgadmin interface. won't lose any data and fast. worth reading about them. I think the hem/pt might have similar tools available too, not sure.
Script to analyze population tendency on HEM Quote
06-25-2012 , 12:50 PM
Quote:
Originally Posted by _dave_
hand export will do, as in you'll be able to recreate a database - but it's super slow. I'd use pg_dump + pg_restore, I think they're made easily accessible available in the pgadmin interface. won't lose any data and fast. worth reading about them. I think the hem/pt might have similar tools available too, not sure.
Im total green in these.

Could you tell me what I can find info how work with this?
Script to analyze population tendency on HEM Quote
06-25-2012 , 01:32 PM
Quote:
Originally Posted by noskill1
Im total green in these.

Could you tell me what I can find info how work with this?
you have to open your pgadmin by Start>All programs>Postgresql X.X> pgadmin. Then connect to "PostgreSQL" and insert your user and password if requested and right click on your database.
After that, you can choice the "Backup" option and select the name and folder of your backup file. Make sure that at the end of the process it returns the 0 exit code (means no error).

To restore the database, iirc the correct procedure is to create a new database by HEM, then open pgadmin III, right click on the created database and then choice "Restore". At this point, you have to select the file containing the database backup and click ok. Again, make sure there are no errors at the end of the process.
Script to analyze population tendency on HEM Quote
06-25-2012 , 01:42 PM
Quote:
Originally Posted by kasparovski
lol, well, i re-read op and luckily i already had an alias with all my sn so no problem with that, how do i limit the number of players?

"The following error occurred when running this report: ERROR: 54001: stack depth limit exceeded"

? i can only see the result, not the reports, pf cards or hands.
If you are running HEM1, you have to run the script in the post #11. At the end of that, just before the last ";", you have to insert the code
Code:
AND p1.player_id < 4000;
This code insert the frst 4000 players.

Then you have to insert other 4000 players. Instead of the previous code, running the same query of post #11 inserting
Code:
AND p1.player_id >= 4000 AND p1.player_id < 8000
And continue until the end of your players.
Script to analyze population tendency on HEM Quote
06-25-2012 , 05:57 PM
yes hm1. tyvm, will try it later.
Script to analyze population tendency on HEM Quote
06-27-2012 , 03:12 PM
A brief summary of the things to do to create an alias of all players.


0. Before make any changes in your database, make sure you have a backup.
To create a backup of your database, you have to open your pgadmin by Start>All programs>Postgresql X.X> pgadmin. Then connect to "PostgreSQL" and insert your user and password if requested and right click on your database.
After that, you can choice the "Backup" option and select the name and folder of your backup file. Make sure that at the end of the process it returns the 0 exit code (means no error).

To restore the database, the correct procedure is to create a new database by HEM, then open pgadmin III, right click on the created database and then choice "Restore". At this point, you have to select the file containing the database backup and click ok. Again, make sure there are no errors at the end of the process.


1. After the backup, first of all you have to create an alias for your nicknames. It's simple to do that on HEM: in HEM1, for example, click on Options>Player Aliases, then click on Add alias, choice a name for it (ie Hero) and then add to it all your nicknames clicking on Add Player. I don't use HEM2, but I assume the process is the same.


2. Open your pgadmin by clicking on Start> All Programs> PostgreSQL X.X (for me it's 9.0) and click on pgadmin. Once opened, expand Server and double-click on PostgreSQL X.X (localhost: yyyy). If required, enter the password. At this point you have to expand Databases and click on your database of interest (for me it's SNG HU).


3. Then you have to open the query tools by Tools> Query tools. When the new window opens, make sure you are using the correct database checking the window title (for me it's Query - SNG HU on ...). Then insert the codes listed below. For every code, you have to run it by clicking on Query>Execute (or just press F5). If you have to insert a new code, open a new query window by clicking File>New window (or just press CTRL+N)



At this point the things changes if you are using HEM1 (a) or HEM2 (b).
4.Run this query. It create the new alias 'Global alias' and return its id; note the number, it will serve you in a minute.

a)
Code:
INSERT INTO players (site_id, playername, cashhands, tourneyhands, playertype_id)
VALUES (-1, 'Global alias', 0, 0, 0)
RETURNING player_id;
b)
Code:
INSERT INTO players (playername, pokersite_id, cashhands, tourneyhands, optimizationstatus, icon)
VALUES ('Global alias', -1, 0, 0, 0, 0)
RETURNING player_id;

5. Assume that the number returned by the previous query is 12345.
Then populate the alias with this code. You have to replace "12345" with the number returned by the previous query and "Hero" with the alias name choosed for your nicknames in step 1 (not your nickname!!! ).

a)
Code:
INSERT INTO aliases 
SELECT 12345, p1.player_id
FROM players p1
WHERE p1.player_id NOT IN
(
	SELECT a1.player_id
	FROM aliases a1
	WHERE a1.aliasplayer_id = 12345
	-- to exclude players yet inserted
)
AND p1.player_id NOT IN
(	
	SELECT a2.player_id
	FROM players p2 JOIN aliases a2 ON p2.player_id = a2.aliasplayer_id
	WHERE p2.site_id = -1 and p2.playername = 'Hero'
	-- to exclude hero nicknames from the insert	
)
AND p1.site_id <> -1
-- to exclude other aliases
;
b)
Code:
INSERT INTO aliases 
SELECT 12345, p1.player_id
FROM players p1
WHERE p1.player_id NOT IN
(
	SELECT a1.player_id
	FROM aliases a1
	WHERE a1.aliasplayer_id = 12345
	-- to exclude players yet inserted
)
AND p1.player_id NOT IN
(	
	SELECT a2.player_id
	FROM players p2 JOIN aliases a2 ON p2.player_id = a2.aliasplayer_id
	WHERE p2.pokersite_id = -1 and p2.playername = 'Hero'
	-- to exclude hero nicknames from the insert	
)
AND p1.pokersite_id <> -1
-- to exclude other aliases
;

6. If your database has more than 10 000 players, the first time you run the script you have to separate the players in different groups. At the end of code in step 5 (before the last semicolon) insert this code and run it
Code:
-- ...all the previous code above...
AND p1.player_id < 5000;
Then, as above, insert at the end of the code in step 5 this code and run it
Code:
-- ...all the previous code above...
AND p1.player_id >= 5000 AND p1.player_id < 10000;
Continue until you inserted the whole players.

For the next times you have to execute only code in step 5.


7. Optimize your database. To do it right-click on your database by pgadmin (for me it's SNG HU) and:
a) click on Maintenance, select VACUUM, check FULL and ANALYZE and click OK. When it completes, click on Done.
b) Select REINDEX and click OK; again, at the end click on Done.


8. Now you can close pgadmin and look at your alias on HEM. If you had it opened restart it and ... enjoy!!


NB: I'm sorry for my bad English. Some terms can be different on your pgadmin because I don't use an English version.
Any help with the work on the Global Alias is appreciated.
Script to analyze population tendency on HEM Quote
06-27-2012 , 03:39 PM
This is awesome, will be much helpful with some pictrues step by step.

I don't get 5 and 6 step

I made in HM1 Alias names 'Population'.

Open Query, made copy/paste "a) Code" , and what next?

Still don't get it what I have to do with this "12345" and 'Hero'. Im not sure what you mean. Even don't know where exactly paste it.

You are doing great job, its really awesome. Please help me with that. Thank you
Script to analyze population tendency on HEM Quote
06-27-2012 , 07:27 PM
Quote:
Originally Posted by noskill1
This is awesome, will be much helpful with some pictrues step by step.

I don't get 5 and 6 step

I made in HM1 Alias names 'Population'.
you don't have to made an alias as 'Population' by HEM, but by pgadmin. With the query in 4. you create an alias called 'Global alias', that is the same.
By HEM you have to create an alias with your nicknames on different skins; I named it 'Hero'.

Quote:
Open Query, made copy/paste "a) Code" , and what next?
Press F5 and run the code

Quote:
Still don't get it what I have to do with this "12345" and 'Hero'. Im not sure what you mean. Even don't know where exactly paste it.
When you execute the first query (by pressing F5), it returns a number. In the second query just replace 12345 with the number you obtained.
'Hero', as said above, it's the alias for your nicknames.

If you have other questions, post it
Script to analyze population tendency on HEM Quote
06-27-2012 , 07:31 PM
About PT4, it's difficult to create a 'Global alias'.
But Benjamin opens a 3d in the support forum, and maybe things can change if others support the request
Here the link
https://www.pokertracker.com/forums/...209259#p209259
Script to analyze population tendency on HEM Quote
06-27-2012 , 08:00 PM
THANK YOU!!!!!!
Script to analyze population tendency on HEM Quote
06-28-2012 , 08:38 AM
Hey Buddy again.

I figure out I made mistake last time I did it, cuz I didn't replace "Hero" with Aliast with my nickname.

I decide I will again open pgadmin and made it again what I did before, but will replace "Hero" by Alias name now.

I made all this and open Holdem manage, choose "Preflop Cards" filter, and:




Edit: Ok I read it few pages before and everything working now! Thank you

Last edited by noskill1; 06-28-2012 at 08:54 AM.
Script to analyze population tendency on HEM Quote
06-28-2012 , 09:54 PM
I see its only working for "Preflop Cards" options.

I was trying to see how opening % at 25BB deep population tendency is, and when I click "reports" I do not see any hand.

Anyone have same trouble?
Script to analyze population tendency on HEM Quote
06-28-2012 , 11:21 PM
Quote:
Originally Posted by noskill1
I see its only working for "Preflop Cards" options.

I was trying to see how opening % at 25BB deep population tendency is, and when I click "reports" I do not see any hand.

Anyone have same trouble?
works w everything for me. (i am on HM2)
Script to analyze population tendency on HEM Quote
06-29-2012 , 08:14 AM
How would you move from HM1 to HM2 by most faster method?
Script to analyze population tendency on HEM Quote
08-14-2012 , 06:34 PM
I cant get it to work properly in HEM2.
Either I get a really small sample or it crashes.
Any idea of what it could be?

And its really laggy overall though I have a good computer.
Script to analyze population tendency on HEM Quote
08-31-2012 , 03:20 PM
I get the same error message as noskill1 when I try to access the Reports or Preflop Cards tab. I did all the steps mentioned on tigerjack89's post.

I've got about 37k players on my database and I kept repeating step 5 until I got to
"AND p1.player_id >= 35000 AND p1.player_id < 40000;"

Any light here? Hem 1 btw

Thanks
Script to analyze population tendency on HEM Quote
08-31-2012 , 03:50 PM
Nice! ty
Script to analyze population tendency on HEM Quote
09-01-2012 , 12:48 AM
Well, I think there is some limits in the memory postgresql can use.
A solution coul be to try to run HEM as administrator.

If it doesn't work, try to take a look at this, especially in the sections regarding HEM and postgresql; it is for postgresql 8.x, but I think it works also for 9.x
Script to analyze population tendency on HEM Quote
09-01-2012 , 02:41 AM
yeah there has to be an edit to postgresql.conf that bumps up the number of aliases allowed, good thinking!
Script to analyze population tendency on HEM Quote
09-02-2012 , 07:46 PM
Sorry for the spam if not appropriate but my beta software creates an alias in HEM/HM2 for different player types (user defined if desired) without having to do the hard work in sql



The software is currently free and will remain so for the foreseeable future

Script to analyze population tendency on HEM Quote
09-02-2012 , 07:59 PM
looks cool!! I think a lot of people will appreciate this software!
When I have more free time, I'll test it
Script to analyze population tendency on HEM Quote
09-04-2012 , 03:44 AM
Tried the speed tweaks.
http://faq.holdemmanager.com/questio...6+Speed+Tweaks

Damn HEM1 is superfast now. Everything loads instantly.
The dump/restore is really good aswell, better then vacum/reindex i think.
HEM2 and PT4 is still slow as usuall, even thought they run on SQL x64-bit.


Also tweak windows abit in the registry and turned of unnessecary services that windows auto-start. Computer is lightening fast now. Never had a computer this fast before I dont even have time to react.

In fact, it also increased the speed of how fast I can register to tournaments!!

Anyone nows why HEM2 is so F* slow? Takes ages to do anything.
And PT4 allocates all my computer memory after about 2hours (4GB).
Script to analyze population tendency on HEM Quote
09-04-2012 , 04:38 AM
Quote:
Originally Posted by mrbambocha
Tried the speed tweaks.
http://faq.holdemmanager.com/questio...6+Speed+Tweaks

Damn HEM1 is superfast now. Everything loads instantly.
The dump/restore is really good aswell, better then vacum/reindex i think.
HEM2 and PT4 is still slow as usuall, even thought they run on SQL x64-bit.


Also tweak windows abit in the registry and turned of unnessecary services that windows auto-start. Computer is lightening fast now. Never had a computer this fast before I dont even have time to react.

In fact, it also increased the speed of how fast I can register to tournaments!!

Anyone nows why HEM2 is so F* slow? Takes ages to do anything.
And PT4 allocates all my computer memory after about 2hours (4GB).
So, the problem with alias is solved??
Never used HEM2 before, so I can't help you.
Anyway, to increase also Windows speed, take a look at this
http://www.ocztechnologyforum.com/fo...mp-Utilities-*
Script to analyze population tendency on HEM Quote

      
m