[MDEV-7674] ANALYZE shows r_rows=0 Created: 2015-03-06  Updated: 2015-03-07  Resolved: 2015-03-07

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.1.3
Fix Version/s: 10.1.4

Type: Bug Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: analyze-stmt


 Description   

ANALYZE-stmt may print 0 in r_rows column:

create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, key(a));
insert into t2 values (0),(1);
analyze select * from t1 straight_join t2 force index(a) where t2.a=t1.a;
id     select_type     table   type    possible_keys   key     key_len ref     rows    r_rows  filtered        r_filtered      Extra
1      SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10      10      100.00  100.00  Using where
1      SIMPLE  t2      ref     a       a       5       test.t1.a       2       0       100.00  100.00  Using index

this happens when some index lookups do not yield a row.
We should change r_rows to show fractions.


Generated at Thu Feb 08 07:21:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.