More than likely your query time is based on a lack of indexes. You
may want to check to ensure that your database isn't actually slowing
you down instead of the rendering of your graph. Switching web servers
will not help the speed of your query. You need to look at your
datamodel and your indexing.