> > ... that being said (and I took a quick test with 10000 
> > randomly-inserted
> > records and fetched them in index order) if the data's in the 
> > cache, the
> > speed difference is insignificant. 
> 
> As long as everything fits into the system cache and is 
> already in there, this test is moot.

Oh, if we want to test how cache is affected by index-nature of
MySQL-BDB then 10000 rows table is toooo small. It adds just
2 levels of internal pages (including root) and ~25 8k pages
to ~ 190 pages of true heap table: additional pages will be
cached very fast, just while fetching first 25 rows from table -:) 
Now create 10000000 rows table (~ 25000 additional pages, 3 internal
levels) and fetch random 10000 rows...

...And again - does MySQL-BDB really read *table* for query like
select a from foo order by a? I remember that MySQL is smart to
read only index when possible...

Vadim

Thu, 25 May 2000 10:14:41 -0700
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM>
RE: Berkeley DB...