Hi.

On Fri, Feb 16, 2001 at 09:42:02AM +0100, [EMAIL PROTECTED] wrote:
> Benjamin Pflugmann wrote :
[...]
> > "Second" is never the best way. MySQL uses "First" up to some
> > percentage of the amount of records (30% I believe), then uses
> > "Third", because reading the data in file order (unsorted) and sorting
> > is usually faster than random seeks (due to index usage) over that
> > percentage of records.
[...]
> Sorry to jump in the middle of this thread but your comment make me
> think of a case where random seeks may still be better even if more
> than 30% of records are involved:

You are completely right. That's why I said "usually" above. But it
shouldn't make a too big difference generally. In the original
problem, the speed difference was so huge, because MySQL could avoid
reading the data file at all in one case.

> When you set up your database server so that it has enough RAM to
> keep the whole database in main memory (buffer cache), random reads
> don't need to wait for physical disk seeks and can be very fast.
[...]
> So my question is:
> Is it a way to tune this threshold ?

AFAIK, currently the only way is to change it within the source and
recompile MySQL.

Bye,

        Benjamin.


---------------------------------------------------------------------
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