午夜剧场伦理_日本一道高清_国产又黄又硬_91黄色网战_女同久久另类69精品国产_妹妹的朋友在线

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

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

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

問題描述

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

還有一點(diǎn)關(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| av黄色网 | 欧日韩一区二区三区 | 五月综合色| 欧美一级视频免费观看 | 日韩国产在线观看 | 天天久久 | 日本精品三区 | 亚洲网站在线播放 | xxxx在线视频 | 久久国产免费观看 | 精品国产一区在线观看 | 欧美视频一二三区 | a在线天堂| 国产精品久久久久9999 | 在线观看免费黄色片 | 91久久久久国产一区二区 | 久久久综合色 | 成人一二三四区 | 红桃av在线| 四虎国产在线 | 成人免费精品 | 国产精品久久久精品 | 91久久精品日日躁夜夜躁国产 | 午夜超碰| 久久精彩视频 | 欧美男人天堂网 | 日本a v网站 | 女人日批视频 | 日韩中文字幕有码 | 日本www视频在线观看 | 国产女人高潮时对白 | 国产精品国产精品国产专区不片 | 羞羞在线视频 | 亚州av在线播放 | 国产乱人伦精品一区二区 | 日本在线观看一区二区三区 | 欧美另类xxx | 超碰免费观看 |