1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

BUG#35850 "Performance regression in 5.1.23/5.1.24"

- Disable the "prefer full scan on clustered primary key over full scan
  of any secondary key" rule introduced by BUG#35850.
- Update test results accordingly 
(bk trigger: file this for BUG#35850)
This commit is contained in:
sergefp@mysql.com
2008-05-07 09:58:21 +04:00
parent f315e66399
commit c21dbf27cf
5 changed files with 57 additions and 28 deletions

View File

@@ -6506,13 +6506,16 @@ make_join_readinfo(JOIN *join, ulonglong options)
!(tab->select && tab->select->quick))
{ // Only read index tree
/*
See bug #26447: "Using the clustered index for a table scan
is always faster than using a secondary index".
*/
It has turned out that the below change, while speeding things
up for disk-bound loads, slows them down for cases when the data
is in disk cache (see BUG#35850):
// See bug #26447: "Using the clustered index for a table scan
// is always faster than using a secondary index".
if (table->s->primary_key != MAX_KEY &&
table->file->primary_key_is_clustered())
tab->index= table->s->primary_key;
else
*/
tab->index=find_shortest_key(table, & table->covering_keys);
tab->read_first_record= join_read_first;
tab->type=JT_NEXT; // Read with index_first / index_next