top:
day week month all

Linux

Community for : 3.2 years

v/Linux is home to all things related to the Linux Operating System. All goats are welcome, it doesn't matter if you have never used Linux before, or, You are an experienced pro. Please be respectful!

Owner: lord_nougat

Mods:
TheRealBuddha












0
Anyone know why a mysql query call to simply select count(*) would take 9 seconds for 2.3 million entries?     (Linux)
submitted by CoronaHoax to Linux 1 day ago (+0/-0)
2 comments last comment...
I moved a db from a personal machine to a VPS, mariadb to mysql, and now -

select count(*) from table_name;

calls are taking like 9 seconds.

Also a lot of other calls that used to take like 0.5 seconds now take 10. They're all calls that are under an index...

Can anyone please tell do you know are there any settings that are likely to alleviate this? I'm finding it hard to believe just 2.5 million records are causing this much slow down just because it's a VPS (4 gb ram, 2 cpus, should be respectable enough hd access)?