幸运飞艇停吗

ASP源碼.NET源碼PHP源碼JSP源碼JAVA源碼DELPHI源碼PB源碼VC源碼VB源碼Android源碼
當前位置:首頁 >> 數據庫 >> 其他數據庫 >> order by后面主鍵,走主鍵索引,不走where后面字段索引

order by后面主鍵,走主鍵索引,不走where后面字段索引

來源:網絡整理     時間:2018-10-25     關鍵詞:

BENPIANWENZHANGZHUYAOJIESHAOLE" order byHOUMIANZHUJIAN,ZOUZHUJIANSUOYIN,BUZOUwhereHOUMIANZIDUANSUOYIN",ZHUYAOSHEJIDAOFANGMIANDENEIRONG,DUIYUQITASHUJUKUGANXINGQUDETONGXUEKEYICANKAOYIXIA: order byHOUMIANZHUJIAN,ZOUZHUJIANSUOYIN,BUZOUwhereHOUMIANZIDUANSUOYIN,DAOZHISUDUHENMAN,YUANYIN:YOUHUAQIRENWEIPAIXUSHIBIJIAOHAOSHIDECAOZUO,ERZOUSUOYINSHIBUHUIYOUEWAIDECAOZUO、QIESUOYINSHIYOUXUDE...


 order by后面主鍵,走主鍵索引,不走where后面字段索引
order by后面主鍵,走主鍵索引,不走where后面字段索引,導致速度很慢,原因:

YOUHUAQIRENWEIPAIXUSHIBIJIAOHAOSHIDECAOZUO,ERZOUSUOYINSHIBUHUIYOUEWAIDECAOZUO、QIESUOYINSHIYOUXUDE,YINCIXUANZELEZHUJIANSUOYIN。

~~~~~~~~~~~~~~~~~~~~~

只有,where后面字段都在索引里,才走該索引。
 order by后面主鍵,走主鍵索引,不走where后面字段索引
幸运飞艇停吗 ~~~~~~~~~~~~~

幸运飞艇停吗JIUSUANwhere+order by ZIDUANHEZUHESUOYINZIDUANYIZHI,YEBUZOUGAISUOYIN,ZHIRENwhereHOUMIANDE。(allocateid,TONGSHIPIPEIDAODANYISUOYINHEFUHESUOYIN,MORENZOUDANYISUOYIN)


 order by后面主鍵,走主鍵索引,不走where后面字段索引

單一索引
 order by后面主鍵,走主鍵索引,不走where后面字段索引
復合索引


 order by后面主鍵,走主鍵索引,不走where后面字段索引

幸运飞艇停吗 YISHANGJIUJIESHAOLE order byHOUMIANZHUJIAN,ZOUZHUJIANSUOYIN,BUZOUwhereHOUMIANZIDUANSUOYIN,BAOKUOLEFANGMIANDENEIRONG,XIWANGDUIQITASHUJUKUYOUXINGQUDEPENGYOUYOUSUOBANGZHU。

BENWENWANGZHILIANJIE:http://snifly.cn/article/detail_4594933.html

相關圖片

相關文章