Most gains in performance derive from good database design, thorough query analysis, and appropriate indexing. The largest performance gains can be realized by establishing a good design and by choosing the correct indexing strategy.
Other considerations, such as hardware and network analysis, can locate bottlenecks in your installation.