If the query is taking 20 minutes even with the database in RAM, I’d look closely at the query execution plan before investing in faster CPUs. With over 2 million users, sorting and aggregating across all projects could be the real bottleneck. I’d check the indexes, temporary tables, and whether the query is doing unnecessary full-table scans or sorting large intermediate results. Splitting it into four chunks can actually make things slower if each chunk repeats expensive work or requires additional sorting and merging. MyISAM versus InnoDB performance will also depend on the query and table structure. Have you profiled the query to see where most of those 20 minutes are being spent?