maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #04873
MDEV-406: EXPLAIN ANALYZE or a different syntax?
Hi.
MDEV-406. The chosen syntax is "EXPLAIN ANALYZE".
Pro:
1. PostgreSQL uses this syntax.
Contra:
1. Full name is EXPLAIN ANALYZE SELECT. But statements are at most two
words in MySQL: SHOW PROCESSLIST, CREATE TABLE, etc. Even the task
description talks about EXPLAIN ANALYZE. Having EXPLAIN SELECT and
(in the future) EXPLAIN UPDATE and EXPLAIN DELETE, EXPLAIN ANALYZE
looks like it's EXPLAIN ANALYZE TABLE. But it is not.
2. In SQL the stament is a verb. That's the spirit of the standard.
SELECT something. INSERT something. CREATE something, SHOW...
We've deviated from it with the HANDLER command, unfortunately.
Still, EXPLAIN ANALYZE SELECT is very unnatural English.
EXPLAIN SELECT is better, because "SELECT" is perceived as a noun,
as "SELECT statement". So EXPLAIN SELECT means "explain the SELECT
statement". But EXPLAIN ANALYZE SELECT just doesn't map into English
at all.
Possible variants (keep in mind that instead of SELECT one might later
have UPDATE and DELETE):
EXPLAIN ANALYZED SELECT ...
ANALYZE SELECT ....
The last syntax is stragely consistent with EXPLAIN: We used to have
both
EXPLAIN table_name
and
EXPLAIN SELECT ...
So, extending
ANALYZE TABLE table_name
to
ANALYZE SELECT ...
follows this weird historical pattern.
(which is, of course, no argument, just a funny coincidence)
Regards,
Sergei