Subject Question regarding preparing queries
Author Maya Opperman
Hi Guys,

Question regarding preparing queries inside stored procedures, inspired by: "Re: Query is running slowly for the first time."

In that post, Thomas( I think ?) reckoned the slow down on large tables, is form the query becoming unprepared.

I have a selectable stored procedure, that call another selectable stored procedure, ie. Very basically:

For
Select this_field, that_field
from my_table
into OField1, OField2
do
begin
select another_field
from my_sub_proc(:Ofield1)
into OField3;
end

I am experiencing this same slow down, so I take it, that means that my_sub_proc is getting re-prepared for every iteration of my_table?

If so, is there a way I can make it stay prepared, for as long as my main stored proc is running?

Thanks
Maya




[Non-text portions of this message have been removed]