Return to site

GREEN IT Developer ๐ŸŒ๐Ÿ’š: Stored procedures

October 1, 2022

Stored procedures are more effective ๐Ÿ’ช and resource-efficient than SQL queries sent to the relational database management system (RDBMS) by the application server. There are two reasons for that:

1๏ธโƒฃ - a stored procedure saves the server from interpreting the query as it is pre-compiled โš™๏ธ

2๏ธโƒฃ - a stored procedure uses less bandwidth ๐ŸŒ as there is less information transferred between the server and the client

You should therefore utilize this RDBMS function as much as possible.๐Ÿ™Œ

All recent RDBMS (SQL Server, MySQL, PostgreSQL, etc.) support stored procedures.

When should I use stored procedures?

- To avoid sending complex queries to the SQL server, which are analyzed for syntax and then interpreted before being run. These steps use up many resources ๐Ÿ‘Ž.

- To simplify the websiteโ€™s code and thus improve maintainability. A websiteโ€™s ecological ๐ŸŒ๐Ÿ’š footprint also includes the resources used to maintain and upgrade it.

#greenIT #developer #storedProcedure