The invention relates to a memory
database OLTP and OLAP
concurrency query optimization method. The method includes the steps that (1) by means of two query
processing engines, independent storage engines are adopted to a
dimension table and a
fact table; (2) the
dimension table is updated through an embedded
concurrency control mechanism of the independent storage engines, the
fact table is equivalent to multiple continuous arrays in logic and maintains two
dynamic data structures, namely a read
record pointer and a write
record pointer, the read
record pointer records the position of the last record inquired through OLPA currently, and the write record pointer records the insert position of a new record; (3) an OLTP transactional
queue and an OLAP transactional
queue are independently executed with the read pointer and the
write pointer as boundaries, the
fact table adopts a column storage horizontal fragmentation model based on the fixed number of columns, N columns of storage records serve as an independent column storage container, and each column storage container adopts an
independent data compression mechanism; (4) an access function on compressed data or non-compressed data is provided through access interfaces of the column storage containers when OLAP query has access to the column storage containers.