Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
YpsiloN2
Novice


Joined: 13 Jul 2003
Posts: 48
Location: Estonia

PostPosted: Thu Feb 05, 2004 2:43 am   

silly map databse compacting question
 
what does the "Compact map database" function actually do? exactly please. some examples also please :)

also. if I did it then it sayd at first I had 201kB map and then after compacting I had only 167kB left... but the actual .mdb file was 27MB at the start and 22MB after compacting... what did those 201kB and 167kB had to do with anything?

just curious [:I]
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Feb 05, 2004 3:38 am   
 
The "Compact map database" function actually make the database smaller if it can.

Your example of the DB dropping from 27MB to 22MB is quite good, and I can not improve upon it. All I can say is that it is like lyposuction, all the data is there and something the database didn't really need and will never miss got removed. In fact the more I think about it, the more I conclude that it is a very good analogy. Since the db is always happy with its new skinny form and generally proceeds to consume massive quantities of data and get fat again.

Those silly numbers you mentioned in your example (201kB and 167kB) are just that. Some silly numbers that the programmers at Microsoft thought would confuse many people but be nice to report. Zugg did the same thing every other programmer that has run into them did...scratched his head and decided to report them to the users and let them wonder.
Reply with quote
Rapunzel77
Newbie


Joined: 27 Dec 2005
Posts: 2
Location: Germany

PostPosted: Tue Dec 27, 2005 2:30 pm   
 
I usesd "Compact map" hand tried speedwalking afterwards, but it will not update my position anymore, so speedwalking does not work.
I didn't change anything else in between, so I guess it must be because of the compactiong.
Any suggestions?
Reply with quote
Iceclaw
Apprentice


Joined: 11 Sep 2005
Posts: 124

PostPosted: Tue Dec 27, 2005 4:16 pm   
 
The wierd thing to me is that I noticed that when I run a compact database It seems to change seemingly random exits into one way exits, making a mess of my mazes/general jogging. Perhaps something similar has happened in your case?
Reply with quote
Dodgester
Wanderer


Joined: 17 Nov 2005
Posts: 65

PostPosted: Tue Dec 27, 2005 5:15 pm   
 
I wouldn't know anything about the compacting causing such an issue as that. However, the mapper does use an MDB file type, which is actually an MS Access DB file, thus also use the JET Engine for it's DB function. The one thing that I have noticed about working with MS Access, when you start working with it, it expands quite a bit as you are working with it, thus the best way to get optimal performance from it is to compact it, especially at the end of each session. Without repairing and compacting the DB file, you can run into various issues and even to the point that the file could get corrupted, thus why I suggest that it gets compacted on a fairly regular basis.

Here's a copy of the help text from within the Access 2003 program about compacting and repairing. As far as having in exclusive mode, unless you specifically have the DB file setup as shared, it is already in exclusive mode when you are using it with the mapper. However, if you open the MDB file separately while having the mapper open, you no longer have exclusive access to the file, cause the file is now opened from 2 different sources, even though it's both on the same computer.

START OF QUOTE

To ensure optimal performance, you should compact and repair your Microsoft Access files on a regular basis. Also, if a serious problem occurs while you are working in an Access file and Access attempts to recover it, you might receive a message that the repair operation was cancelled and that you should compact and repair the file.

Caution When you compact a Microsoft Access file located on a volume that uses the NTFS file system, Access removes the existing file and replaces it with the compacted file. It then applies the default file permissions to the new file. If the file is an Access database (Microsoft Access database: A collection of data and objects (such as tables, queries, or forms) that is related to a particular topic or purpose. The Microsoft Jet database engine manages the data.), use Access user-level security (user-level security: When using user-level security in an Access database, a database administrator or an object's owner can grant individual users or groups of users specific permissions to tables, queries, forms, reports, and macros.) instead of file-level permissions. Otherwise, use folder permissions. For more information about the NTFS file system and folder permissions, see Windows Help.

You must have Open/Run and Open Exclusive permissions (permissions: A set of attributes that specifies what kind of access a user has to data or objects in a database.) for an Access database in order to compact and repair it.

Compact and repair the current Access file

If you are compacting a shared Microsoft Access database (multiuser (shared) database: A database that permits more than one user to access and modify the same set of data at the same time.) that is located on a server or shared folder, make sure that no one else has it open.
On the Tools menu, point to Database Utilities, and then click Compact and Repair Database/Project.
Compact and repair an Access file that is not open

Close the current Microsoft Access file. If you are compacting a shared Access database (multiuser (shared) database: A database that permits more than one user to access and modify the same set of data at the same time.) that is located on a server or shared folder, make sure no one else has it open.
On the Tools menu, point to Database Utilities, and then click Compact and Repair Database.
In the Database to Compact From dialog box, specify the Access file you want to compact, and then click Compact.
In the Compact Database Into dialog box, specify a name, drive, and folder for the compacted Access file.
Click Save.
If you use the same name, drive, and folder, and the Access database or Access project is compacted successfully, Microsoft Access replaces the original file with the compacted version.

Compact and repair an Access file automatically every time you close it

Compacting does not occur if you close a shared Access database (multiuser (shared) database: A database that permits more than one user to access and modify the same set of data at the same time.) while another user has it open.

Open the Access database or Access project that you want Microsoft Access to compact automatically.
On the Tools menu, click Options.
Click the General tab.
Select the Compact on Close check box.
Note You can stop the compact and repair process by pressing CTRL+BREAK or ESC.

END OF QUOTE

Sincerely,

Dodgester
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Dec 28, 2005 1:39 am   
 
Rapunzel77 wrote:
I usesd "Compact map" hand tried speedwalking afterwards, but it will not update my position anymore, so speedwalking does not work.
I didn't change anything else in between, so I guess it must be because of the compactiong.
Any suggestions?


Have you closed down the mapper since then? I have this issue all the time with compacting my maps, and a simple restart of the mapper module or possibly the zmud character fixes everything. Since ZMud loads the map into memory rather than constantly reading from/writing to the disk, my guess is that zmud doesn't update the memory space even though the DB file is now fixed and proper.
_________________
EDIT: I didn't like my old signature
Reply with quote
Dodgester
Wanderer


Joined: 17 Nov 2005
Posts: 65

PostPosted: Wed Dec 28, 2005 3:06 am   
 
Quote:

Since ZMud loads the map into memory rather than constantly reading from/writing to the disk


Interesting. When I check the MDB file via Access, it shows everything updated when ever I close out the "Object" table (If it was open), and then reopen the table just after adding some rooms to it via either the automapper or manually doing it. Even with me using a secured workgroup file, it still shows the information being updated. The only thing that I can think of is that when compacting takes place (at least when it's done via Access), the file gets closed out and then reopens up right at the very end of the process, thus why it requires the exclusive mode, cause when it's in shared mode, the file can't be closed out. Maybe this is the part that zMUD is not taking into consideration. I can't say for certain, but that could be the issue as Access does this automatically to free up the RAM usage on the system.

Sincerely,

Dodgester
Reply with quote
Rapunzel77
Newbie


Joined: 27 Dec 2005
Posts: 2
Location: Germany

PostPosted: Wed Dec 28, 2005 9:49 am   
 
After I reopened zmud again it worked fine. Must have been something else that got confused here.
Thank you all for the great and numerous answers. Smile
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net