大年夜 warning 的 message 字段中可以或许看到优化器主动去除了 1=1 恒成立的前提,也就是说优化器在改写 sql 时会主动去掉落恒成立的前提。
explain 敕令也有对分区的支撑.
- MySQL [sakila]> CREATE TABLE `customer_part` (
- -> `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- -> `store_id` tinyint(3) unsigned NOT NULL,
- -> `first_name` varchar(45) NOT NULL,
- -> `last_name` varchar(45) NOT NULL,
- -> `email` varchar(50) DEFAULT NULL,
- -> `address_id` smallint(5) unsigned NOT NULL,
- -> `active` tinyint(1) NOT NULL DEFAULT '1',
- -> `create_date` datetime NOT NULL,
- -> `last_update` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- -> PRIMARY KEY (`customer_id`)
- ->
推荐阅读
远胜微软谷歌等翻译器 | 基于神经网络和超级计算机的DeepL Translator
Microsoft Translator是微软旗下的翻译对象,痊愈客岁成功切换至神经网路。当时,微软表示比拟较今朝行业内主流的统计机械翻译(SMT)技巧,神经收集架构可以或许大年夜幅晋升翻译质量。德>>>详细阅读
本文标题:优化SQL语句的一般步骤
地址:http://www.17bianji.com/lsqh/37055.html
1/2 1

网友点评
精彩导读
科技快报
品牌展示