A system and method are disclosed to improve processing time of a database
system by continuous automatic background optimization of a cache memory
that is fragmented into a plurality of cache fragments. The system and
method include collecting indicators about efficiency of individual cache
fragments by at least one of measuring a cache hit ratio of each cache
fragment, measuring a processing time that a CPU of the database system
needs to prepare data in the individual cache fragments, and measuring
execution time the CPU needs to process the data in accordance with a SQL
query. The system and method include calculating and revising
approximation curves for measured values of each cache fragment to find a
combination of cache fragment sizes with a highest system throughput. The
system and method include changing the sizes of the cache fragments to
receive highest system throughput.