Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MY SQL Queries are Slow

8 views
Skip to first unread message

George

unread,
May 11, 2012, 12:47:14 AM5/11/12
to
Hi,
I am using Application in one Server and MySql DB in another
server(Both are Linux). I am using the InitialContext and Datasource
for connection using java.Here my problem is Slow in Query execution
while calling from the application server. While I deploying the
application and the MySql in the same server it is fast. Here I am
using the LAN IP between two servers. How can I resolve this?

Cheers!

George
Message has been deleted

Brian Cryer

unread,
May 15, 2012, 5:15:31 AM5/15/12
to
"George" <viju...@gmail.com> wrote in message
news:a45f57c0-e9ac-4687...@ob2g2000pbb.googlegroups.com...
The LAN is the obvious suspect, but there are other things to check first.

I know you said that when you deploy the application and MySQL to the same
server it is fast, but is this the same server that you have your MySQL on
now? So if you log in to the same server that your application is querying
against, is it fast locally for those same queries? So is it an issue with
the server you have deployed MySQL to or an issue with the database on that
server? For example lack of indexes might not show up in testing (because
the database is typically small) but are likely to show up fairly quickly on
a live system.

Thinking about the LAN, what speed is the LAN and how much data do your
queries pull back? For example if your LAN were 100mbps and each query is
pulling back 1MB of data then you won't get more than 10 queries a second
(if that).

Hope this helps.
--
Brian Cryer
www.cryer.co.uk/brian


The Natural Philosopher

unread,
May 15, 2012, 6:21:08 AM5/15/12
to
what bandwidth is the lan IP?

> Cheers!
>
> George


--
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.

George

unread,
May 19, 2012, 9:38:31 AM5/19/12
to
On May 15, 3:21 pm, The Natural Philosopher <t...@invalid.invalid>
wrote:
Thanks for all your Instant replies.
I am using the LAN Bandwidth of 100 Mbps

Jerry Stuckle

unread,
May 19, 2012, 9:55:24 AM5/19/12
to
That's only part of it. How many hops between the two servers? What is
the real speed on each hop? How busy is each hop?

When referring to LAN speed, you need to look at the throughput on the
LAN, not just the physical speed. There are many other limiting factors.

And what about the other questions people asked?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================
0 new messages