Quote:
Originally Posted by tigerjack89
A brief summary of the things to do to create an alias of all players.
Any idea how to do this but without Hero nick in this alias?
Obvious i could do that manually in HM2 - but HM2 does not search for player right when i press frist letter it does not find this nick.
Ok - now it works also for me did not check correclt this point:
"select VACUUM,
check FULL and ANALYZE and click OK. " ~!
What i did:
1. did Back-up of the database.
2. made Alias new -> with my nick only
Share.Pho.to | This photo set was shared via Share.Pho.to
3. closed HM2
4. opened SQL PG admin
5. opened Database the same name as above
6. made
Code:
INSERT INTO players (playername, pokersite_id, cashhands, tourneyhands, optimizationstatus, icon)
VALUES ('Global alias', -1, 0, 0, 0, 0)
RETURNING player_id;
this returned number:
12537
7.
did:
Code:
INSERT INTO aliases
SELECT 12537, 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
;
result on another try with number 12538 - this time:
http://i.imgur.com/Zw1bz7p.png - 7125 rows
http://i.imgur.com/GHad926.png - but i do not see output here, is that normal?
8.
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.
http://i.imgur.com/SD1OP8h.png
b) Select REINDEX and click OK; again, at the end click on Done.
http://i.imgur.com/GZhVslV.png
did that closed PG admin,
opened HM2, and what i saw was
globalAliases with nicks.
and "ALL" has one nick, my nick
Last edited by yami; 11-22-2015 at 02:51 PM.