How database performance limits everyday office work

How database performance limits everyday office work

Many know the feeling - when you are on a call with a customer early on Monday morning, want to quickly check something in the system, and then that loading bar pops up. Every second feels like an eternity from that moment on.

Databases are actually a brilliant invention. They separate data storage from application logic, so that a database manufacturer can develop the perfect fail-safe data storage with the best query performance, and a software manufacturer can build application logic such as an ERP system or a customer database.

How hard drives slow down databases

To ensure that no data is lost due to a computer crash, database management systems (DBMS) do not store their data in the RAM, but on the hard drive (HDD or SSD).

The problem is: RAM is about 100x faster than HDD and SSD storage. For this reason, most DBMS also cache their data in the RAM. And now comes the problem:

On Monday morning, the data is not yet cached in the RAM, but is still on the HDD. Only after the first data access can the data be served quickly.

The solution to this is In-Memory Databases. With these, it is guaranteed that the data, although saved on the hard drive, is also kept in the RAM at all times. Since RAM memory is many times more expensive than hard drive space, it must be compressed particularly well.

How industrial applications are slowed down by database logic

Database systems are designed to guarantee absolute data security - at the cost of performance.

During every write operation (e.g., inserting new data), the database waits until the data is safely written to the hard drive. This delay is noticeable and prevents applications from continuing with the program until the data is also on the hard drive.

In real-time applications such as industrial control systems, this is a problem. To avoid falling behind schedule, applications here collect enough data to send it to the database in larger batches. There are also databases where you can adjust the data security settings per table.

How to calculate statistics faster

Large data collections are usually not a problem for databases. Suitable data structures such as indexes ensure that the database does not have to touch all data even if not all data fits on the screen.

Another thing is when all data actually has to betouched, e.g., when calculating a statistic.

We have already mentioned in-memory databases, which can already achieve a speed factor of x10-x100. The next level is column-based databases.

Most statistics refer to only 2-3 of potentially hundreds of columns that the data records can have. If you only want to know the sum of all sales, you are not interested in the buyer's name. This can be taken advantage of by arranging the data so that the relevant data is located close together in memory, thereby better utilizing the speed of the RAM, which always reads entire blocks of contiguous data.

The highest level in the field of analytics is thenParallelization: Instead of "allocating" one CPU core per request like traditional DBMS, analytical databases rely on breaking the calculation task into many small portions and having all CPU cores (or even multiple servers) work on the task together.

Launix participates in the development of MemCP

MemCP is an open-source database that improves exactly these points compared to previous database systems:

Launix is significantly involved in the development of this piece of free software in order to offer its customers the best possible performance when using the ERP software.

More info on MemCP at: https://memcp.org

Categories