From: | Simon Connah <simon(at)connah(dot)dev> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Stored procedures or raw queries |
Date: | 2025-08-06 12:03:41 |
Message-ID: | CAAxq4K1ekV9d3RA-qw2qS1cjBbOhF+4Vhf4BO_YPF0zKBeWH8w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I'm pretty new to PostgreSQL and am building a simple website with it.
My main question is whether I should use stored procedures / functions
or whether I should embed raw SQL queries in my backend? I understand
that procedures are faster as it cuts down on the round trip speed and
the database can optimise it better.
On the other hand raw SQL is much easier to manage as you just change
the query in your bankend code without having to apply changes to the
database at deployment time of your backend.
What is considered the best approach? My backend is written in Go if
that makes a difference.
If you need any additional information then please let me know.
Simon.
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Swanhart | 2025-08-06 12:07:49 | Re: Stored procedures or raw queries |
Previous Message | Mircea Cadariu | 2025-08-06 04:01:18 | Re: analyze-in-stages post upgrade questions |