This information is for Version 2.0 of Cardbox for Windows.
We recommend that you upgrade to Cardbox 3.

Memory requirements for custom sequencing

When you use the View, Sequence command to sort records into a different order, you have the option of using a custom sequence. If you redefine the fields on which the sequence is to be built, or set the Recalculate option to tell Cardbox to recalculate the existing custom sequence, Cardbox has to go through a sequence-building operation. Unlike most of the rest of Cardbox, this operation requires an amount of memory that varies with the number of records to be processed. This article describes how to calculate the memory required.

You probably don't need to read this article if your database has no more than about 100,000 records.

Prologue: virtual memory versus physical memory

Physical memory is the RAM chips actually installed in your computer. Windows can make it appear that more memory exists than is really installed, by keeping data on disk and pulling them in to RAM only when a program actually asks for them. Virtual memory makes it appear that the computer has more memory than it really has. In many cases, the illusion is complete, and the extra time taken by swapping data between disk and RAM is minimal. But if a program needs to access every part of the memory is has requested in an essentially random order, virtual memory suddenly becomes very slow indeed. Sorting is such an operation, so some care is needed.

How to increase physical memory How to increase virtual memory
Buy more chips and plug them in.
Windows 3.1 and Windows for Workgroups
Open Control Panel, double-click on the Enhanced icon, and press the Virtual Memory button; then press Change if you want to change the settings.
Windows 95
Windows 95 is claimed to manage virtual memory automatically. If you need to inspect or change the settings, open Control Panel (in the Settings section of the Start Menu), open "System", click on the Performance tab, and then press the Virtual Memory button. The commonest cause for low virtual memory on a Windows 95 system is that there is not enough spare disk space on the drive on which the swap file is located.


If you have a database with a million records:

Physical memoryVirtual memory
For best results: 16MB.
Minimum: 12MB (this will be much slower).
For good results: 24MB (more memory will improve speed).
Minimum: 16MB.
These figures refer to the amount of memory left when Cardbox is already running, so you have to add a certain amount to allow for the memory taken by Cardbox, Windows, and any other Windows programs that you are using.


If you are sorting n records, you need free physical memory of at least 12n and preferably 16n bytes.

You need free virtual memory of at least 16n bytes. If you are sorting on fields that have more than one indexed term in them, then having more virtual memory will allow Cardbox to extract more index information each time it reads through the database index: for instance, virtual memory of 24n bytes will allow Cardbox to pick up information about three indexed terms per field each time it reads through the index.

Technical notes
Cardbox Software Home Page