1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

merge::records_in_range and optimizer

sql/sql_select.cc:
  optimizer bug fixed. (what's the difference between s->records ans s->found_records ?)
This commit is contained in:
unknown
2002-11-17 18:58:03 +01:00
parent 564c7b241f
commit 4589844513
3 changed files with 72 additions and 4 deletions

View File

@ -1219,7 +1219,7 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds,
select->quick=0;
if (records != HA_POS_ERROR)
{
s->found_records=records;
s->records=s->found_records=records;
s->read_time= (ha_rows) (s->quick ? s->quick->read_time : 0.0);
}
}
@ -1944,7 +1944,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count,
records
This gives the formula:
records= (x * (b-a) + a*c-b)/(c-1)
b = records matched by whole key
a = records matched by first key part (10% of all records?)
c = number of key parts in key