Server IP : 172.67.216.182 / Your IP : 162.158.189.142 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/mysql-test/suite/opt_trace/r/ |
Upload File : |
SET optimizer_trace_max_mem_size=1048576; SET @@session.optimizer_trace="enabled=on"; # # BUG#18195373: OPTIMIZER TRACE SHOULD PRINT NAME OF # INDEX FOR RANGE ACCESS CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); INSERT INTO t1 VALUES('Testing how', 'full-text search'), ('is printed to the', 'optimizer trace.'), ('We need test coverage','of that too'); SELECT * FROM t1 WHERE MATCH(a,b) AGAINST ("coverage"); a b We need test coverage of that too SELECT * FROM information_schema.OPTIMIZER_TRACE; QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES SELECT * FROM t1 WHERE MATCH(a,b) AGAINST ("coverage") { "steps": [ { "join_preparation": { "select#": 1, "steps": [ { "expanded_query": "/* select#1 */ select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (match `t1`.`a`,`t1`.`b` against ('coverage'))" } ] } }, { "join_optimization": { "select#": 1, "steps": [ { "condition_processing": { "condition": "WHERE", "original_condition": "(match `t1`.`a`,`t1`.`b` against ('coverage'))", "steps": [ { "transformation": "equality_propagation", "resulting_condition": "(match `t1`.`a`,`t1`.`b` against ('coverage'))" }, { "transformation": "constant_propagation", "resulting_condition": "(match `t1`.`a`,`t1`.`b` against ('coverage'))" }, { "transformation": "trivial_condition_removal", "resulting_condition": "(match `t1`.`a`,`t1`.`b` against ('coverage'))" } ] } }, { "substitute_generated_columns": { } }, { "table_dependencies": [ { "table": "`t1`", "row_may_be_null": false, "map_bit": 0, "depends_on_map_bits": [ ] } ] }, { "ref_optimizer_key_uses": [ { "table": "`t1`", "field": "<fulltext>", "equals": "(match `t1`.`a`,`t1`.`b` against ('coverage'))", "null_rejecting": false } ] }, { "rows_estimation": [ { "table": "`t1`", "table_scan": { "rows": 3, "cost": 2 } } ] }, { "considered_execution_plans": [ { "plan_prefix": [ ], "table": "`t1`", "best_access_path": { "considered_access_paths": [ { "access_type": "fulltext", "index": "a", "rows": 1, "cost": 1.2, "chosen": true }, { "access_type": "scan", "cost": 2.6, "rows": 3, "chosen": false, "cause": "cost" } ] }, "condition_filtering_pct": 100, "rows_for_plan": 1, "cost_for_plan": 1.2, "chosen": true } ] }, { "attaching_conditions_to_tables": { "original_condition": "(match `t1`.`a`,`t1`.`b` against ('coverage'))", "attached_conditions_computation": [ ], "attached_conditions_summary": [ { "table": "`t1`", "attached": "(match `t1`.`a`,`t1`.`b` against ('coverage'))" } ] } }, { "refine_plan": [ { "table": "`t1`" } ] } ] } }, { "join_execution": { "select#": 1, "steps": [ ] } } ] } 0 0 DROP TABLE t1;