I believe the MyISAM format is so fast on simple SELECT count(*) FROM table;
because it actually keeps the current number of rows as a table statistic -
so it doesnt have to look at the data at all. Using a WHERE clause, however,
will force MyISAM to actually select all the rows and count how many it
finds. This is what InnoDB tables and others do. Of course doing your own
testing shouldnt be that hard and is always the best way to figure out how
your application will hold up.

dpk

----- Original Message -----
From: "Sander Pilon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 18, 2001 12:19 PM
Subject: InnoDB vs MyISAM on COUNT(*) ... WHERE ...


> I'm thinking of switching to InnoDB, however - my application does a few
> COUNT(*) .... WHERE .... queries on large tables (somewhere between 50K
> and 2M rows)
>
> I've read up on InnoDB and its issues with COUNT(*) on entire tables,
> but is there
> a reason to assume that InnoDB is also slower when there is a WHERE
> clause present?
>
> Regards,
>
> Sander
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to