Stored Procedure Advantages & Disadvantages

Source: Internet
Author: User
Stored procedures are not just for large projects, but for small and medium-sized projects, it is also necessary to use stored procedures. Its power and advantages are mainly reflected in: 1. Stored procedures are compiled only at creation time, and each subsequent execution of the stored procedure does not need to be recompiled, and the general SQL statements are compiled once per execution, so using stored procedures can improve database execution speed. 2. When complex operations are performed on a database, such as when multiple tables are update,insert,query,delete, this complex operation can be encapsulated with stored procedures and used in conjunction with the transactional processing provided by the database. These operations, if done with a program, become a single SQL statement that may be connected to the database multiple times. Instead of storage, you only need to connect to the database once. 3. Stored procedures can be reused to reduce the workload of database developers. 4. High security, can be set only a certain user has the right to use the specified stored procedure. The disadvantage of stored procedures 1: Debugging trouble, but with PL/SQL Developer debugging is very convenient!   compensate for this shortcoming. 2: Porting issues, database-side code is of course related to the database.   However, if you are doing engineering projects, there is basically no transplant problem. 3: Recompile the problem because the backend code is compiled before it is run, and if an object with a reference relationship changes, the affected stored procedures, packages will need to be recompiled (but can also be set to run for automatic compilation). 4: If in a program system to use a large number of stored procedures, to the time of application delivery as the user needs increase will lead to changes in data structure, then the system related problems, and finally if users want to maintain the system can be said to be difficult, and the cost is unprecedented. More trouble with maintenance!

Stored Procedure Advantages & Disadvantages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.