Subject | Re: [firebird-support] Clear Query Cache Firebird 2.1 |
---|---|
Author | Christian Waldmann |
Post date | 2009-06-03T13:39:32Z |
Hi Helen
After disconnecting all users from the database, the altered stored
procedure was avaliable and the result as expected.
An thank you too for the hint, that IBExpert adds an extra layer of
abstraction to the database access.
Christian
After disconnecting all users from the database, the altered stored
procedure was avaliable and the result as expected.
An thank you too for the hint, that IBExpert adds an extra layer of
abstraction to the database access.
Christian
> At 10:30 PM 3/06/2009, you wrote:
>
>> I am developing stored procedures that are used in queries. It looks
>> like my test queries do not use the output of the newest version of my
>> stored procedure, but takes the result from the "query result cache" of
>> the database.
>
> There is no "query result cache". Firebird's cache holds images of pages that have been visited; also (which affects you) it contains the compiled code of any stored procedure or trigger that has been run since the process started. For SS that equals "any connection since the database last came online"; for Classic, it equals "anything I have done in this connection (= process instance)". The cache isn't cleared until the process closes.
>
>> Stepping the procedure returns the expected results!
>
> Sounds as though you are using some tool like IBExpert or similar, that can simulate execution of a SP. It's not executing it at the server.
>
>> Does the altering of stored procedure not clear the corresponding query
>> cache?
>
> Forget "query cache". An altered stored procedure won't be available until after all users have logged out (SS) or to any Classic processes that were running when the ALTER PROCEDURE was executed.
>
>> Is there a command to clear the cache or to force a query to generate
>> new results?
>
> Yes: an API call to isc_detach_database(). ;-)
>
>> I am using Firebird Version "WI-V2.1.2.18118 Firebird 2.1" and IBExpert
>> 2009.03.25
>
> There ya go, then! You're in the virtual world of IBExpert, so you are! ;-)
>
> ./hb
>
>
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>