Hi all.

I discovered a very strange and painful problem on a customer's system
last night.

I have built a gtk2-perl GUI front-end for accessing data in a MySQL
database. It works remarkably well on my laptop, and was working
remarkably well on their system as well, but something has recently
happened to the system. Now when we open forms based on particular
tables, it takes a VERY long time to perform a VERY simple query ( ie
select * from table_name ). The tables themselves only have a few
thousand records ( 3,000 I think ). It takes about 5 minutes to open the
form. There's nothing weird in the data - basically all numeric and
varchar stuff - no big text or binary fields or anything. It was working
*perfectly* last time I was there, I swear!

I've tried using the command-line client, from my laptop, to connect to
their MySQL server. To my surprise, executing queries on ALL tables is
instantaneous. But when I fire up the GUI ( which is using DBD::mysql ),
on my laptop, the problem re-surfaces. Why would connecting with the
command-line client give me instantaneous queries, but connecting via
DBD::mysql display these huge pauses?

I then tried pointing their GUI at my laptop's MySQL installation. Guess
what? No more delays.

So I've isolated the problem to being something to do with their server.
Or have I?

At this point, I should probably point out that there is some *strange*
stuff going on in their /etc/hosts. They've got all the hostnames that
refer to the server on the '127.0.0.1' line. When I told them they
needed to have 127.0.0.1 just for 'localhost' and they needed to add the
IP address of the server against the FQDN they said that this breaks a
number of other things :( I didn't have time to sort through these
'other things', unfortunately, but anyway, could this be causing
problems? If so, why does it only affect certain tables? There are 2
tables that it affects. It takes about 5 seconds for the app to make the
initial MySQL connection, and I was under the impression that networking
( ie /etc/hosts ) issues would have their biggest affect at this point,
and that after logging in, things should be OK.

I have done a full 'check table' thing ( from MySQL Administrator ), and
it replied that there was no problem in any table. When I restarted
MySQL, it had some ... issues ... shutting down and starting up again,
but came up eventually. Unfortunately logging was not enabled at this
point :-|   I didn't set this thing up ...

I'm probably looking at a re-install of MySQL ( it's currently at 4.1.10
), and a restore of their data, right?

Can anyone comment on whether their wacko /etc/hosts could be causing us
problems? Any other ideas?

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to