Running the application with the application's exe and MySQL server on the same computer is always fast.
But when we tried to run the application from another computer, sometimes its slow, sometimes its normal.
What could possibly be the problem. I'm sure there's nothing wrong with the network connection.
Thanks.
Slow query opening
If it's connecting to the database, check this:
http://dev.mysql.com/doc/refman/5.1/en/dns.html
Add the skip-name-resolve to your my.ini/cnf
If it's when opening the query (you're already connected), then look at the amount of data fetched. If you select all fields and only need a few ones, then adjust your query to retrieve only data you need. Retrieving big blobs also takes its time, sometimes it's better to get blobs only when you need them.
Regards
http://dev.mysql.com/doc/refman/5.1/en/dns.html
Add the skip-name-resolve to your my.ini/cnf
If it's when opening the query (you're already connected), then look at the amount of data fetched. If you select all fields and only need a few ones, then adjust your query to retrieve only data you need. Retrieving big blobs also takes its time, sometimes it's better to get blobs only when you need them.
Regards
Re:
Thanks for the quick reply. 
Antaeus, it seemed to be OK when we tried to connect to the database.
The problem started whenever we tried to fetch a data via TMyQuery. Simple query from a small table like
'select UserName from UserLogin where UserID = 1'
which returns 1 record requires a considerable time to execute (about 1 minute).
To GEswin, we only select the required fields. We never use 'select *' nor we ever select BLOB fields for a query that returns more than 1 records (e.g. for listing purpose).
Antaeus, it seemed to be OK when we tried to connect to the database.
The problem started whenever we tried to fetch a data via TMyQuery. Simple query from a small table like
'select UserName from UserLogin where UserID = 1'
which returns 1 record requires a considerable time to execute (about 1 minute).
To GEswin, we only select the required fields. We never use 'select *' nor we ever select BLOB fields for a query that returns more than 1 records (e.g. for listing purpose).