mirror of
https://github.com/MariaDB/server.git
synced 2025-09-27 11:29:12 +02:00
![]() Query blocks have implicit names, such as `select#1`, formulated by appending their select number to the string `select#`. This patch allows hints to scope their applicability by implicit query block name. For example, SELECT /*+ JOIN_ORDER(@`select#2` t1, t2) */ ... @`select#2` is an implicit query block name. Users can control hint applicability per query block without first naming the blocks with QB_NAME(). Hints may now be specified within VIEWs during their creation and they are applied locally within that VIEW's scope. For example, CREATE VIEW v1 AS SELECT /*+ IGNORE_INDEX(t1 idx1) */ FROM t1 ... GROUP BY ... HAVING ... In many cases and for some parts of the VIEW, the query plan doesn't really depend on how the VIEW is used, so it makes sense to control a part of the query plan from the VIEW definition. Implicit names are not yet supported in VIEWs. Attempting to create a VIEW with an implicit name reference will cause the server to create the VIEW, but it will emit a warning and exclude that hint from the query. |
||
---|---|---|
.. | ||
async_example.c | ||
client_metadata.h | ||
client_priv.h | ||
CMakeLists.txt | ||
completion_hash.cc | ||
completion_hash.h | ||
connection_pool.cc | ||
connection_pool.h | ||
echo.c | ||
import_util.cc | ||
import_util.h | ||
mariadb-conv.cc | ||
my_readline.h | ||
mysql.cc | ||
mysql_plugin.c | ||
mysql_upgrade.c | ||
mysqladmin.cc | ||
mysqlbinlog.cc | ||
mysqlcheck.c | ||
mysqldump.cc | ||
mysqlimport.cc | ||
mysqlshow.c | ||
mysqlslap.c | ||
mysqltest.cc | ||
readline.cc |