Strange slow queries (4.0.14, mod_perl2)

Strange slow queries (4.0.14, mod_perl2)

am 08.09.2003 15:37:11 von Erlend Simonsen

I run a site with a few million MySQL requests a day, but I've run
into a strange problem which I'm trying to slove.

The server is running mysql 4.0.14, Apache 2.0.47, mod_perl2-1.99r09,
DBI 1.38 and DBD-mysql 2.1026 on a FreeBSD 4.8 machine.

About once or twice a day, I get a bunch of slow queries that doesn't
look like they should be slow. And most of the day they aren't.

Examples:

# Query_time: 51 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
update innodb_tbl set col1=col1-1000, col2=col2-1000, col3=col3-1000
where primary_key=50;

# Query_time: 46 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
update innodb_tbl set col4=1 where primary_key=50;

# Query_time: 11 Lock_time: 0 Rows_sent: 1 Rows_examined: 0
select * from innodb_tbl where primary_key=1 for update;

......

The list goes on and on... All of my slow queries are really fast at
all other times. Fast as in instant. This doesn't look like a load
issue, and I'm having problems figuring out what is causing this. It's
mostly updates that are behaving slow, I even had one take 3306
seconds. The number of rows in the 'slowest' table is about 2000.

Any ideas where to start digging and what I should try doing? I really
need this solved.

Regards,
Erlend Simonsen

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org