PDA

View Full Version : Merging databases?



weatherman
12-19-2009, 07:59 PM
Around the beginning of the month my database reached ~600K hands, and was starting to have to a ton of lag and other problems. Created a new database and that basically took care of the problems, but for tax purposes I'd like to have a record of all my hands from the year in the same database. Is there an easier way to merge the two databases other than requesting the HH's from this month, then manually importing them into the old db?

fozzy71
12-19-2009, 09:03 PM
Export your new DB to text files and import the hands to the main DB. We have people using DB's with many millions of hands.

http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173


I would suggest you do the majority of the things in this thread: http://www.holdemmanager.net/forum/showthread.php?t=11194

Some of the most important things, imo:

- Remove the WinnerName, WinnerCards and WinnerWon from the Options > Hands View Column Selecto
- Turning off logging and deleting existing logs
- Vacuum/Full/Analyze, then Reindex - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=163
- Defrag last and make sure you stop the postgresql service before you defrag. I personally use Smart Defrag.
- Do a Cold Boot (Shut Down > Start) before you use HM again

_Loki_
12-19-2009, 09:18 PM
Or move to the UK - no TAX :)

fozzy71
12-20-2009, 12:08 PM
Or move to the UK - no TAX :)

http://i207.photobucket.com/albums/bb176/fozzy71/Illustrator/fuuuu2kinkedPaint1.png

Kaizen2000
12-20-2009, 12:19 PM
Export your new DB to text files and import the hands to the main DB. We have people using DB's with many millions of hands. ....
There is a much easier way to merge databases with identical tables.
Horizontally merge (combine, match, union) two PostgreSQL tables into one by a common column (field) of data. The two tables are not changed, a new table is created with the results. Make a backup of this new table using PGAdmin, create a new database with HM and restore the table.

I use EMS SQL Manager for PostgreSQL to merge databases- works like charme and the best thing is- it is freeware.

_Loki_
12-20-2009, 04:11 PM
Great pic Fozzy !!




identical tables.

I use EMS SQL Manager for PostgreSQL to merge databases- works like charme and the best thing is- it is freeware



Hi K can you define identical ?

Please post more info on EMS SQL Mngr pls or a link to where I can look

Thnxs

Kaizen2000
12-20-2009, 05:57 PM
Hi Loki..... the structures of the databases you wanna merge are the same.
The infos about EMS you'll find are in German- I found a short description here (in English):
http://www.postgresql.org/about/news.1138

The users manual is in English- I did an upload for you.
http://www.fileuploadx.de/891629

fozzy71
12-20-2009, 07:14 PM
There is a much easier way to merge databases with identical tables.
..........

I guess it depends on your description of easy. :rolleyes:

_Loki_
12-21-2009, 10:50 AM
Hi K

Thank you for your trouble doing the upload

I've dl'd a copy & will study over Xmas - all 1,015 pages !!!!

Merry Xmas K.

fozzy71
12-21-2009, 02:42 PM
..... - all 1,015 pages !!!!

......

:eek:

Kaizen2000
12-21-2009, 05:30 PM
:eek:
Lol- no way to get some usefull informations in English about the program even if the complete GUI is in English. So I did upload the complete manual.
EMS is a very mighty tool and much better than PGAdmin.

@Loki... you're very welcome- merry X-mas for you too- thx.

_Loki_
12-21-2009, 06:36 PM
http://i844.photobucket.com/albums/ab8/_L_O_K_I_/Badtiming.jpg

BiffMalibu
01-19-2010, 05:52 AM
Hi, I have a similar problem.

My desktop pc crushed yesterday but i was able to copy the whole Postgresql folder (version 8.3). My 2nd database runs on my notebook (version 8.2). I have exported all HH from the notebook and now i want holdemmanager to connecto to the HH that are saved in the folders in version 8.3 that i saved from my desktop pc.

Thanks in advance, Biff.

netsrak
01-19-2010, 07:55 AM
Handhistories are not the same as the database.

If you want to restore your old database with all hands, stats etc. in it: http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177

If you want to create a new database with the copied hands, start Holdemmanager and import the handhistory files via import file or import from folder

BiffMalibu
01-19-2010, 09:32 AM
So if I want to take the 8.3 version database saved from my desktop pc as my regular database on my notebook now what do i have to do:

1. Export all HH from 8.2 version notebook database (note: just HH are important for me)
2. Then i tried to install 8.3 as you said, but when it comes to initialize database cluster its says port number already in use (do i have to delete 8.2 version first)?

Edit: My reading comprehension is very bad, forget about last reply and thanks for answer

EditEdit: I did everything said in FAQ 177, but its still using the 8.2 database

netsrak
01-19-2010, 11:56 AM
You need to uninstall 8.2 before installing 8.3 or you need to use a different port during the 8.3 installation and change this port in the database management too (For example port 5433).