Actually a COUNT(*) without any WHERE condition is much faster on MyISAM since it stores the total nr of rows in the table in the table header.
But a COUNT(*) with a where condition like in your case needs a proper index to gain speed both on MyISAM and InnoDB.
What indexes do you have on the table?
My suggestion is a combined index on (PersonName, persondate) because then both columns in your WHERE condition is part of the index and that is the optimum.
The reason for these questions is that if all of the index and table is already cached in RAM then more RAM will not make a difference.
But if the DB is larger than the available RAM on the machine then you can benefit from adding more RAM.
I just want to make sure,
did you really create a combined index or did you create two indexes, one each column?
I usually name my indexes like:
table_ix_col1_col2
Then I know which columns that are part of the index by just looking at the name.
In your case my index would be named:
[B]Quote:[/B]
marking1_ix_personname_persondate
Then I know immediately what this index does.
my.cnf
That was a very small my.cnf.
And that means that you don’t have almost any internal caching configured since MySQL is very conservative with the default values.
Here’s a couple of addtions to your my.conf, just the most important ones for InnoDB: