can stored procedures with computational sql queries improve API performance?

From: Krishnakant Mane <kkproghub(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: can stored procedures with computational sql queries improve API performance?
Date: 2024-07-10 00:58:46
Message-ID: da4a01d8-ba4e-4752-add4-531cea0e0ac4@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello.

I have a straight forward question, but I am just trying to analyze the
specifics.

So I have a set of queries depending on each other in a sequence to
compute some results for generating financial report.

It involves summing up some amounts from tuns or of rows and also on
certain conditions it categorizes the amounts into types (aka Debit
Balance, Credit balance etc).

There are at least 6 queries in this sequence and apart from 4 input
parameters. these queries never change.

So will I get any performance benefit by having them in a stored
procedure rather than sending the queries from my Python based API?

Regards.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guyren Howe 2024-07-10 01:14:42 Re: can stored procedures with computational sql queries improve API performance?
Previous Message Craig McIlwee 2024-07-10 00:46:45 Re: Finding error in long input file