Accuracer: The First And Only BDE Alternative
Client-Server Single-File Embedded Database for Delphi / C++Builder / Kylix
Modern databases, like Accuracer, provides lots of different settings that can be used for improving performance, making database file more compact, using less amount of RAM, etc. If you do not sure what do you need please, contact our Technical Support Team.
If you perform searching or filtering on large tables the main way of improving performance is to create necessary indexes.
It can be done by using TACRTable.IndexDefs property before creating a table or running TACRTable.AddIndex method or CREATE INDEX SQL Statement when table exists.
If you perform search on the single field ('Name' for example) you should create index on this field.
It is very important to create index on string fields (char, varchar, wide char or wide varchar) with same case sensitivity setting like in searching. If your perform case-insensitive search you should create case-insensitive index, otherwise create case-sensitive index.
TACRTable1.AddIndex('case_ins_index', 'Company', [ixCaseInsensitive]);
TACRTable1.Locate('Company', ['AidAim Software'], [loCaseInsensitive));
You should create multiple-field index if you perform search with conditions for multiple fields.
TACRTable1.AddIndex('complex_index', 'Company;Contact;Phone', );
TACRTable1.Locate('Company;Contact;Phone', VarArrayOf(['Sight Diver','P']), loPartialKey);
SELECT statements also runs faster when all necessary indexes are exists.
We recommend to create indexes for each field that is used in DISTINCT, WHERE, ORDER BY and FROM clauses.
If you use ORDER BY with multiple fields, create a single index on all these fields like in Example 2.
If you use context search with LIKE operator you should not create any indexes - it will not improve preformance.
Note: Indexes decreases speed of table modification, especially with Primary or Unique options.
You can use TACRDataset methods LockTable / UnlockTable for optimizing speed of loading records.
while not ACRTable1.Eof do
// ... some record processing
If you do not need multi-user access, set Exclusive property of TACRDatabase or TACRTable components to True. This will significantly increase the performance, but other applications will not be able to access the tables and databases opened exclusively.
Maximum Number of Connections
You can set the maximum number of connections for each database (using ACRManager or TACRDatabase.Options property) to any value from 1 to ACRMaxSessionCount constant. Smaller value will increase performance in multi-user environment and also provide more compact database file.
How To Make Your Database File More Compact
You can make your file more compact if you will use varchar fields instead of long fixed length string fields.
Also you can use compression for BLOB and Varchar fields.
Read BLOB and Varchar fields topic for more details.
Another tip is to run TACRDatabase.CompactDatabase method periodically (or use ARCManager utility) for removing unused space inside the database file. You can use Density property of TACRDatabase component to get the percent of used space inside the database file.
See Variables and Constants topic in Reference Guide.
Note: If you have any problems with tuning and optimizations, contact our Technical Support Team - we will help as soon as possible.