Subject | RE: [firebird-support] Stored procedure execution time |
---|---|
Author | Svein Erling Tysvær |
Post date | 2012-04-04T06:23:24Z |
>Hi,Sorry, but I think you need to describe your problem more thoroughly on the important parts for us to be of any help. We know nothing about your database (we know it is in Fb 1.5.6, but nothing about its size, content and use) and nothing about what your stored procedure does. I'm pretty certain that Firebird doesn't care what time of day it is used, so there must be something different between the first execution and latter executions of the SP that you haven't told us about (I assume the timing you tell us strictly applies to the stored procedure and doesn't include the time it takes to connect/disconnect or start/commit a transaction).
>I have an application which executes a stored procedure in Firebird 1.5.6 on a fairly
>regular basis (multiple times per day).
>
>Immediately following a backup/restore of the database, the procedure runs fairly quickly
>(less than a second or two) at any time of day.
>
>Gradually, over time (month or so), the first execution of the procedure on any given day
>starts taking longer and longer (15 seconds up to minutes). However, subsequent executions
>of the same procedure the rest of the day run just as quickly as before.
>
>I have checked, and it does not appear to be any other processes running during the initial
>execution.
>
>Any ideas on what causes this?
Typically, slowdowns over time relates to poor handling of transactions, but that would be a general problem, not something that happens only in the morning (though of course, it might be the reason if the first execution involves lots of records whilst subsequent executions involve few records - it would still be a general problem, but you may not notice if something takes 0.1 second as opposed to 0.003 seconds) or only to a particular procedure.
Looking forward to your new problem description,
Set