开发者

does the size\length of a mysql routine make a difference?

I was curious if the length of a mysql routine made any impact on performance. One of the practices of the javascript world is to compress the javascript and remove as much formatting and white space as possible. Does this apply to mysql as well? Should remove as much white space,开发者_运维问答 tabs, CR, etc.?


to compress the javascript and remove as much formatting and white space as possible

This doesn't affect the runtime performance, but the size of the code, which is transferred via HTTP on a web-page-call. It's all about transfer-time, but a MySQL-routine isn't transferred between servers (unless you use some freaky cluster setup). So, no you don't need to minimize a MySQL-routine.


frankly you won't see a difference. minimizing the length of a javascript query works because people with bad bandwidth will wait a bit more to download the script. When using SQL your server, it's either on your website server or both servers are on the same lan (which means no bandwidth issue). You will gain much more performances by tuning your tables, queries and using stored procedures or user defined functions

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜