maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #01565
Re: EXPLAIN and CONNECT
Hi, Federico!
On Mar 27, Federico Razzoli wrote:
> Hi Sergei
>
> You can repeat this very easily:
>
> MariaDB [test]> CREATE TABLE t_connect (c INT PRIMARY KEY) ENGINE=CONNECT TABLE_TYPE=CSV;
> Query OK, 0 rows affected, 1 warning (0.11 sec)
>
> Warning (Code 1105): No file name. Table will use t_connect.csv
> MariaDB [test]> INSERT INTO t_connect VALUES (1),(2);Query OK, 2 rows affected (0.00 sec)
> Records: 2 Duplicates: 0 Warnings: 0
>
> MariaDB [test]> EXPLAIN SELECT MAX(c) FROM t_connect;
> +------+-------------+-----------+------+---------------+------+---------+------+------+-------+
> | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
> +------+-------------+-----------+------+---------------+------+---------+------+------+-------+
> | 1 | SIMPLE | t_connect | ALL | NULL | NULL | NULL | NULL | 4 | |
> +------+-------------+-----------+------+---------------+------+---------+------+------+-------+
> 1 row in set (0.00 sec)
>
> But adding more rows, the difference between the rows value and the reality becomes big.
Thanks, I've reported it as
https://mariadb.atlassian.net/browse/MDEV-6232
I tried to repeat it earlier, but then it uncovered other bugs in the
CONNECT indexes, they're fixed now. Your original query gets "Table was
optimized away", so I have to modified it a bit for the bug report.
Regards,
Sergei
Follow ups
References