Vlad Horsun пишет: >>> И кто его знает, когда ASA решит его из кеша выкинуть >> Если разработчики признаются - расскажу. > > Когда факт выполнения будет сильно отличаться от плана. Но это уже > поздно, т.к. > плохое выполнение запроса уже произошло.
Ответил Glenn Paulley (Research and Development Manager, Query Processing, iAnywhere Solutions Engineering): The server monitors the access plan used for a query in a stored procedure, and if the same plan is used 10 times in a row, that plan is cached and is used for the 11th execution. Periodically, on a logarithmic scale, the query is re-optimized and the plan is compared to the previous one. If it is still the same, the cached plan continues to be used. Queries will be reoptimized at least every 640 times (that is the end of the log scale). A plan cache is abandoned when - user disconnects - any schema modification - any reset of any option setting --~--~---------~--~----~------------~-------~--~----~ -~----------~----~----~----~------~----~------~--~---

