View Single Post
  #25  
Old 09-11-2006, 10:57 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default It's all in the numbers

Quote:
Originally Posted by WildcardX
I can vouch for FNW on this. When I made a database that was a combination of the latest PEQ, Cavedude's latest and Angelox's latest work, I saw my server memory increase by 300% the normal for running just 10 dynamic zones. Atleast, this is what I think is causing it. I'm still trying to prove it, or I was, until I just read FNW's post above...

On the other hand, it sure is nice to have a database that is almost all popped up intil Omens.
This has a pretty simple solution, and is how I optimized my database. I did it with "MySql Query Browser" , a desktop calculator, GeorgeS "MySql Query TooL' , and some index cards to take notes on.
After you run zephyr325's tool, you'll have , new "groups" of high rows/numbers - with "MySql Query Browser", you can sort them so you can see all this; you can see where the original set of numbers end, and the new sets (you made with the tool) start and end.
So, for example, lets say lootdrop originally has ids of 1 -10, and the tool made 10 more rows 20-30. so now you have rows 1-30, the gap being rows 10 -20 so you have to optimize and move the new ten rows to start at 11.
Code:
UPDATE lootdrop SET id=id-9 WHERE (id>=20 AND id<=30);
I ran the code in a windows, mysql command shell - I made backup almost every time I ran new lines, because if I got one "beep", that ment it was all ruined, as one of changes were duplicate and I had to start over with a restore.
Here's some examples of what I touched when I fixed my database.

Code:
UPDATE lootdrop SET id=id-14878 WHERE (id>=102100 AND id<=102200);
UPDATE lootdrop_entries SET lootdrop_id=lootdrop_id-14878 WHERE (lootdrop_id>=102100 AND lootdrop_id<=102200);
UPDATE loottable SET id=id-14878 WHERE (id>=102100 AND id<=102200);
UPDATE loottable_entries SET lootdrop_id=lootdrop_id-14878 WHERE (lootdrop_id>=102100 AND lootdrop_id<=102200);
and these, I don't think mattered, but since for some reason, high numbers became ugly to me;
Code:
UPDATE npc_types SET loottable_id=loottable_id-14878 WHERE (loottable_id>=102100 AND loottable_id<=102200);
UPDATE loottable_entries SET loottable_id=loottable_id-14878 WHERE (loottable_id>=102100 AND loottable_id<=102200);
That was just the finishing touch to a "mass move" of a lot of 8 digit groups I had created.

I haven't used zephyr325's tool yet , but I'm sure the same thing happens to him as what happened to me, when this tool is run.

Also remember, just adding/merging Cavedudes' and PEQ is not the whole solution - it's just a "better start" to what needs to be done.

Last edited by Angelox; 09-12-2006 at 07:02 AM.. Reason: typo
Reply With Quote