Stored procedures - Mailing list pgsql-novice

From Simon Connah
Subject Stored procedures
Date
Msg-id eXWbA7jWtEDZQJSHx3brQYIZX_tj1kEjvG3B1-Sye_0OaGrlBTBRWZ27b_lUuq2wjftN7LfdCbxWy-zfz1dYKXjckquiXaoLh_0CdaP96zI=@protonmail.com
Whole thread Raw
Responses Re: Stored procedures  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Stored procedures  (Gurjeet Singh <gurjeet@singh.im>)
List pgsql-novice
I'm building a website in Python using the Django framework and am using the ORM at the moment but I can see a few
situationswhere I might need to write raw SQL. My question is do stored procedures execute faster when compared to
queriesyou generate using Python and then send to PostgreSQL? I would assume they would as there is less communication
betweenthe two sides and also because PostgreSQL knows the stored procedure ahead of time it should be able to better
optimiseit. 

Is that true? Does PostgreSQL use a JIT for stored procedures which make them faster than one-off queries?

Simon.
Attachment

pgsql-novice by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: create read-only and revoke create function?
Next
From: "David G. Johnston"
Date:
Subject: Re: Stored procedures