Hey everyone,
I’m dealing with a MySQL database that’s outgrown its current setup. It’s getting too much traffic for one server to handle. Throwing more CPU and RAM at it just won’t cut it anymore.
I’m wondering what you guys do in this situation. Do you use something like ProxySQL to split the traffic between different servers? If so, how do you decide which data goes where?
Also, has anyone tried switching to TiDB? I’ve heard it might help, but I’m not sure if all our SQL queries would work with it.
Any tips or experiences would be super helpful. Thanks!
-- Example query that's causing issues
SELECT u.name, o.order_date, p.product_name
FROM users u
JOIN orders o ON u.id = o.user_id
JOIN products p ON o.product_id = p.id
WHERE o.order_date > '2023-01-01'
ORDER BY o.order_date DESC
LIMIT 1000;
This query used to run fine, but now it’s really slow with our growing data. How would you handle this in a multi-server setup?