Reinier,

> It seems that when i do a select and the result is minimal it uses the
> index(fast about 3 sec), but when the result is much more it is not using
> the index. this results in a lot of disk io and taking to much time.

It is correct, because (http://www.mysql.com/doc/en/MySQL_indexes.html at
the end)
"...
Note that in some cases MySQL will not use an index, even if one would be
available. Some of the cases where this happens are:

If the use of the index would require MySQL to access more than 30% of the
rows in the table. (In this case a table scan is probably much faster, as
this will require us to do much fewer seeks.) Note that if such a query uses
LIMIT to only retrieve part of the rows, MySQL will use an index anyway, as
it can much more quickly find the few rows to return in the result.
..."

Try to check query plan (use EXPLAIN command).

> My experience with msql7 is that it keeps thing in memory with results in
> performance improvement. Can this be done with mysql?

IMHO MySQL is doing that in correct way too.

Best regards,
Mikhail.


----- Original Message -----
From: "Reinier van Heusden" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 15, 2002 12:13 PM
Subject: MySQL and io read


> Hello,
>
> I have a mysql database latest version from the freebsd ports running on a
> 350 Mhz with 385 MB memory and 1 ata 33 disk freebsd 4.6 stable server.
>
> I have a database with 5.5 million record in say 1 table. We use this
> read-only.
>
> It seems that when i do a select and the result is minimal it uses the
> index(fast about 3 sec), but when the result is much more it is not using
> the index. this results in a lot of disk io and taking to much time.
>
> My experience with msql7 is that it keeps thing in memory with results in
> performance improvement. Can this be done with mysql? When i use top i
don't
> see mysql using much of my memory.
>
> I haven't changed any settings yet in my.cnf.
>
> [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> 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