I have a database with one table and three fields (id, hash, creation time)
.
This table got around 30 million records, the execution time for a query like
SELECT * from `table` WHERE hash='blahblahblah';
This query is taking around 40 seconds to execute on a 1vCPU 1GB Ubuntu Server with MariaDB installed no other high usage servers are installed.
Now I upgraded my server to 32GB RAM, SSD and 12 core Xeon physical server with MariaDB alone installed on Ubuntu 20.10 and still, the execution time was similar.
I tried increasing the limits in 50-server.conf file and also increased max memory in systemctl edit mariadb and also edited mysql/conf.d in innodb_buffer_pool_size
But still no luck. Is there any way I can improve my MariaDB speed to use entire CPU & RAM to run faster.