How to reduce the size of InterSystems Caché database file CACHE.DAT

How we can reduce the size of cache.dat file? Even after deleting the globals of a particular database from management portal size of its  cache.dat file is not reduced.

  • 0
  • 0
  • 221
  • 1
  • 2

Answers

You need to do these three steps in order:

  1. Compact Globals in a Database (optional)
  2. Compact a Database
  3. Truncate a Database

In can be done via ^DATABASE utility or in management portal.

CACHE.DAT or IRIS.DAT, can only grow during normal work. But you can shrink it manually. But it is not as easy as it maybe sounds. And depends on version which you use, only past few versions were added with the compact tool. On very old versions you have to copy data from old database to thew new one.

You can read my articles, about internal structure of CACHE.DAT, just to know what is this inside. And about database with visualization, where you can see how to compact database, and how it actually works.