Have you run an explain before each scenario to see if the access path is
different? 

-----Original Message-----
From: Jeremy Zawodny
To: Marc
Cc: [EMAIL PROTECTED]
Sent: 8/1/04 8:28 PM
Subject: Re: better performance with optimize!?? (jboss)

On Sun, Aug 01, 2004 at 01:42:24PM +0200, Marc wrote:
> I use Mysql with JBOSS as applicationserver.
> 
> i have strange response-time differences, which i can't explain.
> 
> 1) after reboot the computer, it takes about 300ms to read 12 entities
(cmp,
> read ahead, 2 rows each entity) One entity is accessed by primary key,
the
> others by
> foreign key.
> 
> 2) when i reboot the computer and run mysql optimize first, it takes
only
> about 80ms to read the 12 entities!!

Caching?  In case #2, MySQL may have cached large amounts of the table
during the OPTIMIZE.

> 3) when i do the same with pure java / jdbc (outside jboss), it takes
only
> 30ms!!! it doesn't matter, if i run optimize or not!

JBoss overhead?

I dunno, I'm not a Java guy at all.

Jeremy
-- 
Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

[book] High Performance MySQL -- http://highperformancemysql.com/

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

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

Reply via email to