Skip to content

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

Closed
Totktonada opened this issue Nov 9, 2021 · 3 comments
Closed

Changes in EXPLAIN and PRAGMA #2426

Totktonada opened this issue Nov 9, 2021 · 3 comments

Comments

@Totktonada
Copy link
Member

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

@Totktonada
Copy link
Member Author

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.

@Totktonada Totktonada transferred this issue from tarantool/tarantool Nov 9, 2021
@pgulutzan
Copy link
Contributor

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.

@Totktonada
Copy link
Member Author

Okay. Thanks for re-checking it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants