My query as a small duration time when the Fetch time is quite large. What is exactly the fetching time. Can it be reduced ? Is it dependent on the network since the server is a remote one.
my Query is a simple one
SELECT * FROM Table WHERE id = a primary_Key;
Fetch time does depend on network speed. Your
SELECT Count(*) ... query only returns a single number so network overhead is minimal.
To improve the speed, I suggest you only fetch the columns and rows you need (i.e. replace
SELECT * ... with the exact columns you need).
Also, enabling compression between client and server will reduce time (but will slightly increase CPU usage for compressing/decompressing). See this related question.