Mysql – What kind of SSD to speed up querying a lot of data

mariadbMySQLperformanceperformance-tuningquery-performancessd

For research purposes I am using a big MariaDB database (~500 GB) with 20 Tables (engine: myISAM) and around 9 Billion rows. Due to missing free storage on my Laptop (16 GB RAM), I put the data on an external hard drive. This was sufficient for simple queries. But for more complex tasks the queries take several days. Most of the tasks will be SELECT queries (with multiple joins).

This is why I want to invest into a new internal hard drive (1-2 TB), which will be used in a server setup (128 GB RAM). Due to performance reasons, I think a SSD would be the right choice. The mainboard has both free PCIe x8 and SATA 6.0GB/s slots.

Is there a difference between PCIe SSDs and M.2 SSDs?

What kind of SSD would be the best value for money according to my requirements? I do not want to spend more than 300 $?

Best Answer

would be the best value for money according to my requirements

Shopping/recommendations are generally considered off-topic here, so I'll stick with technical differences and not discus value judgements.

Is there a difference between PCIe SSDs and M.2 SSDs?

M.2 is just a form factor: it can hold drives with either SATA or nVME interfaces. A new PCIe based card will almost certainly be nVME but may be a SATA interface and SATA drive soldered to a board.

What kind of SSD to speed up querying a lot of data?

The chief difference between SATA and NVMe drives is the interface speed which imposes the throughput bottleneck. As latency, which affects random access rates, is likely to be similar between the various SSD types you want NVMe (either surface mounted on a PCIe card or in an M.2 slot) for speed.

Of course compared to your current solution with a drive connected via USB, both should be significantly faster.