Kim Bachman wrote:

From some messages in the archive, I assume I'm running into�the memory mapped file�limit.� I have a file that is about 1.1 GB.� Is there any way to turn off memory mapped files?� My database is not a quarter full and I'm hitting the limit.� Is this size of database beyond the intended use of Metakit?� Should I be looking elsewhere for my database needs?

You can compact your database with, in C++, something like: FILE* fp = open("newdat.mk", "wb"); storage.SaveTo(fp); close(fp);

Then "mv newdat.mk dat.mk" (on Unix).

You must be using views with very large numbers of rows to get such bad free space re-use, perhaps with many small strings? Consider using blocked views, they scale a lot better, and re-use free space *much* better.

Also, if you have indeed huge amounts of strings, and if there is a lot of repetition in there, consider storing them in a separate view and then store integer indices of the original view.

It may sound awkward to have to fiddle with physical representations like this, but I've seen numerous examples of this over the years, occasionally taking up to three orders of magnitude out of the data, and getting huge improvements in performance thrown in as a result. With views, one can hide any amount of tricks beneath a layer, especially when doing more advanced things with c4_CustomViewer.

Don't turn off memory mapped files. You'd need a lot more memory, and you will lose performance, in all but a few rare usage scenarios. A 250 Mb datafile is not beyond MK's capabilities, but on a 32-bit machine, a 2.5 Gb file is. As I said, the trick is to get redundancy out of the stored data - especially with ints, MK tends to create extremely compact datasets (for example: a million rows with one int in the range 0..10 take 500 Kb).

-jcw

_____________________________________________
Metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to