Store procedure VS Dynamic SQL performance ?

125 views
Skip to first unread message

Yordan Yanakiev

unread,
Apr 4, 2024, 12:42:36 PM4/4/24
to firebird-support
Hello dear devs.
I have the follow setup
A database host to which have connected locally working Delphi apps.
A remote server on which is doing Blazor apps ( C# ).
So - the connection to the remote server is quite slow due a lot of security measurements applied. Usually about 2 to 8 MBit/s.
So a large SQL queries which is created on the Blazor host is returning quite slow the data.
I wonder - is it reasonable to invest time and rewrite them as a store procedures ?
Will this affect by any positive way the speed of the returning results. 
( the results are strings mostly )

Mark Rotteveel

unread,
Apr 4, 2024, 1:34:34 PM4/4/24
to firebird...@googlegroups.com
Probably not. By the sound of it, your transferring a lot of data (maybe
even blobs) to the client. If you also do that when you rewrite to a
stored procedure, you probably gain nothing.

Stored procedures can improve performance if *instead* of transferring
data to the client and doing processing there, you move the processing
into the stored procedure and return nothing, or only some aggregate
result to the client.

However, if the main point is getting data to the client, a stored
procedure is unlikely to change anything performance-wise.

Mark
--
Mark Rotteveel

Reply all
Reply to author
Forward
0 new messages