Slow databases can many times become much faster simply by optimizing queries instead of buying new expensive hardware. I can find those resource demanding queries and optimise them to run more efficient and reducing pressure on the entire system. If your database system is not in the size of Facebook (or equivalent) and your queries take longer than 1 second to execute, most probably something is awry with the queries the system is handling and not the resources the database server got.