Ad

Performance And Security With Laravel Query Builder Vs Stored Procedures

Im new to Laravel and have been reading up on its query builder, however haven't been able to find a definite answer. I know that stored procedures are essentially like functions that are stored inside the database to increase performance and security, but does Laravel's query builder work as a replacement for that? Essentially, would it be necessary to use both stored procedures AND the Laravel query builder, or would using the query builder be enough since the functions are already built into Laravel?

Ad

Answer

Query builder is not a replacement of stored procedures. It works using PHP PDO. Stored procedures are a set of SQL queries in the compiled form. It helps to reduce network traffic and improve performance.

Ad
source: stackoverflow.com
Ad