How to improve query performance with order by, group by and joins

做~自己de王妃 提交于 2019-12-06 15:27:42

Given the query is already fairly simple the options I'd look in to are ...

  • Execution plan (to find any missing indexes you could add)
  • caching (to ensure SQL already has all the data in ram)
  • de-normalisation (to turn the query in to flat select)
  • cache the data in the application (so you could use something like PLINQ on it)
  • Use a ram based store (redis, elastic)
  • File group adjustments (physically move the db to faster discs)
  • Partition your tables (to spread the raw data over multiple physical discs)

The further you go down this list the more involved the solutions become. I guess it depends how fast you need the query to be and how much you need your solution to scale.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!