maria-developers team mailing list archive
Mailing list archive
MDEV-406: EXPLAIN ANALYZE or a different syntax?
MDEV-406. The chosen syntax is "EXPLAIN ANALYZE".
1. PostgreSQL uses this syntax.
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
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
EXPLAIN SELECT ...
ANALYZE TABLE table_name
ANALYZE SELECT ...
follows this weird historical pattern.
(which is, of course, no argument, just a funny coincidence)