← Back to team overview

maria-developers team mailing list archive

Re: better execution plan possible with INNER JOIN of mroonga (or whatever storage engine) ?

 

Hi, Kazuhiko!

On Dec 02, Kazuhiko Shiozaki wrote:
> Hello !
> 
> I am investigating a slow query and have a question about execution plan
> with mroonga (possibly any storage engine?).
> (with MariaDB 10.0.15.)

> CREATE TABLE catalog_full_text (
>   uid bigint(20) unsigned NOT NULL,
>   title varchar(255) COLLATE utf8_unicode_ci DEFAULT '',
>   PRIMARY KEY (uid),
>   FULLTEXT KEY title (title) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"'

unrelated comment: in MariaDB it's *much* better to use engine-defined
table attributes for this.
https://mariadb.com/kb/en/engine-defined-new-tablefieldindex-attributes/

> ) ENGINE=Mroonga DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
...
> Accoding to Kohei, a Mroonga developer, we always have 'rows = 1' for
> mroonga full-text query because MariaDB does not request such value to
> mroonga (JOIN::get_examined_rows() in sql/sql_select.cc)

Correct.
 
> So here are my questions :
> 
> * can MariaDB request an 'estimation of rows' to mroonga (or whatever
> storage engine) ?
> * can such information help to decide a better execution plan with
> INNER JOIN like above ?

Yes, I believe it is possible.

I've reported this issue as a bug now:
https://mariadb.atlassian.net/browse/MDEV-7250

Regards,
Sergei



Follow ups

References