List:General Discussion« Previous MessageNext Message »
From:Jeremy Zawodny Date:June 21 2004 6:03pm
Subject:Re: why CPU is high while disks are idle in a table scan???
View as plain text  
On Mon, Jun 21, 2004 at 06:57:51PM +0200, Leonardo Francalanci wrote:
> I'm doing some tests on a 16.000.000 rows table.
> Doing a simple "SELECT SUM(MYFIELD) FROM MYTABLE" I noticed
> that disks are at 0.1%, while cpu arrives up to 80%.
> How is that possible? My HDs are IDE. MySql has around
> 30Mb of ram, I thought it should read a lot from disk.
> 
> Even doing lots of queries by key I get only high cpu usage,
> not disk reads.
> 
> Is that normal?

Hard to say, but in a table scan the CPU does have a lot of work to
do.  It needs to do about 16,000,000 comparisons (based on your info).

Jeremy
-- 
Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<Jeremy@stripped>  |  http://jeremy.zawodny.com/

[book] High Performance MySQL -- http://highperformancemysql.com/
Thread
why CPU is high while disks are idle in a table scan???Leonardo Francalanci21 Jun
  • Re: why CPU is high while disks are idle in a table scan???Jeremy Zawodny21 Jun
    • R: why CPU is high while disks are idle in a table scan???Leonardo Francalanci21 Jun
      • Re: R: why CPU is high while disks are idle in a table scan???Jeremy Zawodny21 Jun
        • R: R: why CPU is high while disks are idle in a table scan???Leonardo Francalanci21 Jun
          • Re: R: R: why CPU is high while disks are idle in a table scan???Jeremy Zawodny21 Jun
  • Re: why CPU is high while disks are idle in a table scan???Brent Baisley21 Jun
    • R: why CPU is high while disks are idle in a table scan???Leonardo Francalanci21 Jun
Re: R: why CPU is high while disks are idle in a table scan???SGreen21 Jun
  • R: R: why CPU is high while disks are idle in a table scan???Leonardo Francalanci22 Jun
Re: R: R: why CPU is high while disks are idle in a table scan???SGreen22 Jun
  • R: R: R: why CPU is high while disks are idle in a table scan???Leonardo Francalanci22 Jun