存储过程性能 [英] stored procedure performance

查看:60
本文介绍了存储过程性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以建议如何提高程序的性能吗?

请建议包括替代代码或索引在内的所有内容等等。

提示:我没有在两个表上创建任何约束和索引。

can any one suggest how to improve the performance of procedure ?
please suggest every thing including alternative code or indexes on which column etc.
hint: i did not create any constraints and indexes on both tables.

推荐答案

Quote:

提示:我没有在两个表上创建任何约束和索引。

hint: i did not create any constraints and indexes on both tables.

如果两个表都没有编入索引,那么在两个表上的电子邮件上创建索引都会对性能产生巨大影响。

如果这对你来说不明显,我猜你有很多阅读计划今年冬天。

阅读关于SQL原则和数据库原理的内容。

If both tables are not indexed, creating a index on Email on both tables will have dramatic effects on performance.
If this is not obvious to you, I guess you have lot of reading to plan for this winter.
Read about principles of SQL and about databases principles.


这是一本关于整本书写的大量话题,所以我建议你谷歌搜索关于存储过程或查询性能的现有文章。



您现在的问题是无法回答的,因为没有一刀切的答案可以提高性能。如果添加索引,则会加快SELECT,但会降低INSERT和DELETE的速度。有很多因素,这是一个复杂的主题,因为你没有准确说明你的SP做了什么,所以不可能给出具体的建议。
This is a massive topic that whole books have been written on so I suggest you google for existing articles on stored procedure or query performance.

Your question as it stands is impossible to answer as there is no "one size fits all" answer for improving performance. If you add indexes then it will speed up SELECTs but slow down INSERTs and DELETEs. There are many many factors, it is a complex subject, and as you haven't said exactly what your SPs do it is impossible to give specific advice.


这篇关于存储过程性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆