← Back to team overview

maria-developers team mailing list archive

Re: Support of the extended syntax for ANALYZE

 

On 05/19/2012 04:22 AM, Sergei Golubchik wrote:
> Hi, Igor!
> 
> On May 10, Igor Babaev wrote:
>> Serg,
>>
>> Here's the patch we talked about on IRC today.
> ... 
>> +ANALYZE TABLE t1(COLUMN(), INDEX());
>> +ANALYZE TABLE t1(COLUMN(c,e,b), INDEX(idx2,idx4));
>> +ANALYZE TABLE t1(COLUMN(*), INDEX(*));
> 
> I see what you want to do.
> 
> I think it'll be more SQL-like, if it'll be more verbose, for example
> 
>   ANALYZE TABLE t1 FOR COLUMNS (c,e,d) INDEXES (idx2, idx4);
> 
> I would prefer to drop parentheses too, but then the grammar will become
> ambiguous :(
> And instead of double (*) it could simply be
> 
>   ANALYZE TABLE t1 FULL;
>                 or ALL;
> 
> it'd be similar to
> 
>   CHECK TABLE t1 EXTENDED;
>   REPAIR TABLE t1 QUICK;
>   etc
> 
> Alternatively, it could have an explicit "PERSISTENT" keyword:
> 
>   ANALYZE TABLE t1 PERSISTENT; -- meaning all columns and indexes
>   ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (c,e,d) INDEXES (idx2, idx4);

We usually don't use key words in plural. So maybe you meant:
ANALYZE TABLE t1 PERSISTENT FOR COLUMN (c,e,d) INDEX (idx2, idx4);
?

Regards,
Igor.

> 
> That's probably the best one. Reasonably SQL-like. And the most common
> use case (analyze all) is short, it's clearly the main, default
> behavior. And the clause to specify columns and indexes extends the
> default syntax.
> 
> Regards,
> Sergei
> 



Follow ups

References