List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:January 14 2011 2:56pm
Subject:Re: bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3248)
WL#5741
View as plain text  
Hello,

Jorgen Loland a écrit, Le 14.01.2011 13:22:
> 
> 
> On 01/11/2011 02:44 PM, Guilhem Bichot wrote:
>> Hello again,
>>
>> This is fine, I just have curiosity questions:
>>
>> Jorgen Loland a écrit, Le 11.01.2011 12:56:
>>> + "records_estimation": [
>>> + {
>>> + "database": "test",
>>> + "table": "t2",
>>> + "records": 1,
>>
>> Do you know why it says there is 1 record, though the table is empty?
> 
> The code doesn't check how many rows there are, but the fact that it has 
> type system or const:
> 
>         if (s->type == JT_SYSTEM || s->type == JT_CONST)
>         {
>           trace_table.add("records", 1).add("cost", 1);
>           trace_table.add_alnum("table_type", (s->type == JT_SYSTEM) ?
>                                 "system": "const");
> 
>           /* Only one matching row */
>           s->found_records= s->records= s->read_time=1; s->worst_seeks= 
> 1.0;
>           continue;
>         }

ok. It's a bit unfriendly that we display 1 when there is 0, but this 
seems to be what the optimizer wants to assume, so ok.
Thread
bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3248) WL#5741Jorgen Loland11 Jan
  • Re: bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3248)WL#5741Guilhem Bichot11 Jan
    • Re: bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3248)WL#5741Jorgen Loland14 Jan
      • Re: bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3248)WL#5741Guilhem Bichot14 Jan