Actually the query is dynamic so I cannot really estimate the volume.

And the requirement is not only to get the data but also to generate a chart. so there is a lot of processing on the web server also. comparatively this portion takes about 60% of the time and data fetch is 40%.

Its seems I have to keep the connection open to get the chart.