亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術(shù)文章
文章詳情頁

mysql - 為什么使用Group By對SQL的索引性能會有很大的影響

瀏覽:118日期:2022-06-21 13:57:17

問題描述

為什么使用Group By對SQL的索引性能會有很大的影響?索引是不是能提升group by的性能?

還有一點關(guān)于SQL的疑問,為什么在使用模糊查詢的時候,%name%, 如果使用了前模糊,會使得索引沒有了效果,這個怎么理解,雖然模糊的知道可能是這樣的,但是找不到官方對此的說法。謝謝~

問題解答

回答1:

“對索引性能有很大影響”是指什么?索引的時間太久了?但這似乎又和gruop by沒什么關(guān)系。

所以我猜你的問題是不是“索引是不是能提升group by的性能”?這個問題的因果關(guān)系好想更容易理解些,那如果是這個問題的話,可能下面這段話能給你一些提示:

SQL databases use two entirely different group by algorithms. Thefirst one, the hash algorithm, aggregates the input records in atemporary hash table. Once all input records are processed, the hashtable is returned as the result. The second algorithm, the sort/groupalgorithm, first sorts the input data by the grouping key so that therows of each group follow each other in immediate succession.Afterwards, the database just needs to aggregate them. In general,both algorithms need to materialize an intermediate state, so they arenot executed in a pipelined manner. Nevertheless the sort/groupalgorithm can use an index to avoid the sort operation, thus enablinga pipelined group by.

原文出處:Indexing Group By

相關(guān)文章:
主站蜘蛛池模板: 久久中文字幕久久久久91 | 国产999在线 | 国产精品综合一区二区三区 | 欧美日韩亚洲国产精品 | 一级特黄a大片免费 | 日韩在线免费视频 | 中国一及黄色片 | 国产黄色高清视频 | 免费啪 | 米奇精品一区二区三区在线观看 | 国产香蕉久久 | 日韩欧美一区二区不卡看片 | 中文字幕欧美成人免费 | 青青草a国产免费观看 | 国产精品麻豆 | 国产三级观看久久 | 综合激情婷婷 | 亚洲精品福利在线 | 91网站在线免费观看 | 日韩欧美在线综合网高清 | 国产999在线| 亚洲六月丁香婷婷综合 | 久久久91精品国产一区二区 | 黄色一级大片儿 | 欧洲美女粗暴交视频 | 亚洲一二区 | 亚洲精品中文一区不卡 | 国内成人精品亚洲日本语音 | 色综合色综合色综合色综合 | 一级高清毛片免费a级高清毛片 | 久久久久亚洲精品一区二区三区 | 国产区网址 | 夜夜精品视频一区二区 | 玖玖精品视频在线观看 | 亚洲免费专区 | 成人亚洲国产综合精品91 | 黄色网址在线免费观看 | 亚洲性色综合图区图片 | videosg最新欧美另类 | 国产乱码精品一区二区三区四川 | 国产不卡网 |