-
Notifications
You must be signed in to change notification settings - Fork 43
Changes in EXPLAIN and PRAGMA #2426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It is from 2.1.2, but I found that this documentation request was never filed explicitly, so I filed it manually just in case: maybe there are important details here. Feel free to close. |
This is indeed old. We nowadays use box.execute not box.sql.execute, and we do not support case_sensitive_like -- it's not in the manual and it's not in pragma.h. As for EXPLAIN SELECT, the manual https://www.tarantool.io/en/doc/latest/reference/reference_sql/sql_statements_and_clauses/#explain has the sentence "This [i.e. EXPLAIN] is primarily a debugging and optimization aid for the Tarantool team." so there's no need for more than the example there. If I remember correctly, that sentence is due to instructions from K. Osipov. I suggest that this should be closed with no action. |
Okay. Thanks for re-checking it! |
The most important change is that the column names for
the result of the "EXPLAIN ...", "EXPLAIN QUERY PLAN ..."
and "PRAGMA ..." commands are now defined.
Example:
box.cfg{listen = 3302}
cn = require('net.box').connect(box.cfg.listen)
cn:execute('EXPLAIN SELECT 1;')
In addition, the 'case_sensitive_like', 'parser_trace' and
'sql_default_engine' pragmas now return their values if
they are executed without arguments. For the first two
pragmas, this value is their state, and for the latter,
the default engine currently set in SQL.
Example:
box.sql.execute('PRAGMA case_sensitive_like;')
And the last change is that now the execution of the
“PRAGMA” command without determining which pragma to
execute returns status for all flag-type pragmas.
Flag-type pragmas are pragmas that have TRUE or FALSE as
status.
Example:
box.sql.execute('PRAGMA;')
Requested by @ImeevMA in tarantool/tarantool@828b8b3
The text was updated successfully, but these errors were encountered: