色综合图-色综合图片-色综合图片二区150p-色综合图区-玖玖国产精品视频-玖玖香蕉视频

您的位置:首頁技術文章
文章詳情頁

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

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

問題描述

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

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

問題解答

回答1:

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

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

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

相關文章:
主站蜘蛛池模板: 清纯唯美综合网 | 久草在在线视频免费 | 久久中出| 国产精品麻豆一区二区三区v视界 | 美女张开腿给男人捅 | 亚洲美女影院 | 性生大片一级毛片免费观看 | 亚洲韩国日本欧美一区二区三区 | 亚洲bt欧美bt国产bt | 成 人 黄 色 大 片 | 青草福利在线 | h亚洲 | 欧美日韩国产成人精品 | 日韩一级视频在线观看播放 | 一级毛片在线免费视频 | 欧美高清一级片 | 女人毛片a毛片久久人人 | 国产精品日本一区二区在线播放 | 国产精品久久久久久久久久久不卡 | 久久伊人操 | 精品久久久日韩精品成人 | 免费一级a毛片 | 久久青草免费线观最新 | 精品网址 | 亚洲欧美一级久久精品 | 亚洲天堂视频一区 | 亚洲成人视 | 一区二区精品视频 | 亚洲爆爽 | 2020夜夜操| 久久这里只有精品免费视频 | 欧美一级毛片大片免费播放 | 日韩美女视频一区 | 可以免费看黄的网址 | 老太婆性杂交毛片 | 国产一区2区 | 国产成人高清亚洲一区久久 | 在线成人天天鲁夜啪视频 | 免费在线精品视频 | 日本a一级片 | 高清一级淫片a级中文字幕 高清一区二区 |