This section describes the formula for estimating VCI memory requirements.
Use the following formula to obtain a rough estimate of memory requirements:
memUsedByVci = memForData + memForEachProcess
Memory required to store data in memory
Secure the space estimated using the formula below on the stable buffer (part of shared_buffers).
memForData = (numOfRowsInTables) x (numOfBytesPerRow) + (wosSize)
numOfBytesPerRow = (19 + (numOfColsInCreateIndexStatement) / 8 + (numOfBytesPerSingleColValue)) x 1.1
Note: Round up the result to the nearest integer.
wosSize = (numOfWosRows) / 185 x 8096
One row is added to the number of WOS rows for each INSERT and DELETE, and two rows are added for UPDATE. On the other hand, the number decreases to 520,000 rows or less during conversion to ROS performed by the ROS control daemon.
Memory required for each process
memForEachProcess = memUsedPerScanning + memUsedForVciMaintenace + memUsedByCreateIndexStatement
Parallel scan
memUsedPerScanning = vci.shared_work_mem + (numOfParallelWorkers + 1) x vci.maintenance_work_mem
Note: The number of parallel workers used by VCI simultaneously in the entire instance is equal to or less than vci.max_parallel_degree.
Non-parallel scan
memUsedPerScanning = vci.max_local_ros + vci.maintenance_work_mem
Note
vci.shared_work_mem, and vci.max_local_ros are used to create local ROS. If local ROS exceeds these sizes, execute a query without using VCI according to the conventional plan.
vci.maintenance_work_mem specifies the memory size to be secured dynamically. If it exceeds the specified value, a disk temporary file is used for operation.
memUsedForVciMaintenace = vci.maintenance_work_mem x vci.control_max_workers
memUsedByCreateIndexStatement = vci.maintenance_work_mem
Note
vci.maintenance_work_mem specifies the memory to be secured dynamically. If it exceeds the specified value, a disk temporary file is used for operation.