﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-新青年-文章分类-DB/Sql Server 2000</title><link>http://www.cnitblog.com/canny/category/6440.html</link><description>放飞梦想 持续优化 追求完美</description><language>zh-cn</language><lastBuildDate>Thu, 29 Sep 2011 09:56:16 GMT</lastBuildDate><pubDate>Thu, 29 Sep 2011 09:56:16 GMT</pubDate><ttl>60</ttl><item><title>[转]存储过程的优缺点</title><link>http://www.cnitblog.com/canny/articles/35924.html</link><dc:creator>新青年</dc:creator><author>新青年</author><pubDate>Tue, 06 Nov 2007 05:34:00 GMT</pubDate><guid>http://www.cnitblog.com/canny/articles/35924.html</guid><wfw:comment>http://www.cnitblog.com/canny/comments/35924.html</wfw:comment><comments>http://www.cnitblog.com/canny/articles/35924.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/canny/comments/commentRss/35924.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/canny/services/trackbacks/35924.html</trackback:ping><description><![CDATA[优点： <br />1.速度快。尤其对于较为复杂的逻辑，减少了网络流量之间的消耗 <br />我有的过程和函数达到了几百行，一个微型编译器，相信用程序就更麻烦了。 <br />2.写程序简单，采用存储过程调用类，调用任何存储过程都只要1-2行代码。 <br />(我不知道别人怎么调用，我是深受其益） <br />3.升级、维护方便 <br />4.调试其实也并不麻烦，可以用查询分析器 <br />5.如果把所有的数据逻辑都放在存储过程中，那么asp.net只需要负责界面的显示阿什么的，出错的可能性最大就是在存储过程。我碰到的就一般是这种情况。 <br /><br />缺点： <br />1.可移植性差，我一直采用sql server开发，可是如果想卖自己的东西，发现自己简直就是在帮ms卖东西，呵呵。想换成mysql，确实移植麻烦。 <br />2.采用存储过程调用类，需要进行两次调用操作，一次是从sql server中取到过程的参数信息，并且建立参数；第二次才是调用这个过程。多了一次消耗。 <br />不过这个缺点可以在项目开发完成，过程参数完全确定之后，把所有过程参数信息倒入到一个xml文件中来提高性能。 <br />3.其它缺点有待大家探讨。<br /><br />源于<a href="http://www.linkui.cn/read-12.html">http://www.linkui.cn/read-12.html</a><img src ="http://www.cnitblog.com/canny/aggbug/35924.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/canny/" target="_blank">新青年</a> 2007-11-06 13:34 <a href="http://www.cnitblog.com/canny/articles/35924.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>