{"id":2499,"date":"2012-09-07T21:08:21","date_gmt":"2012-09-08T02:08:21","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=2499"},"modified":"2012-09-07T21:08:21","modified_gmt":"2012-09-08T02:08:21","slug":"dbms_stats-and-no_invalidate","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2012\/09\/07\/dbms_stats-and-no_invalidate\/","title":{"rendered":"dbms_stats and no_invalidate"},"content":{"rendered":"<p>Since at least 10.2.0, Oracle has decided by default when to invalidate a dependent cursor when query optimizer statistics are gathered.  You can determine what setting you have by the following:<\/p>\n<pre lang=\"sql\">\r\nSQL> select dbms_stats.get_param('NO_INVALIDATE') from dual;\r\n\r\nDBMS_STATS.GET_PARAM('NO_INVALIDATE')\r\n--------------------------------------------------------------------------------\r\nDBMS_STATS.AUTO_INVALIDATE\r\n\r\nSQL>\r\n<\/pre>\n<p>This probably works well if you are using the default statistics gathering job.  If you find yourself in a position where you have to gather optimizer statistics out of that window, please make sure you set no_invalidate => false when you call dbms_stats to ensure query plans are regenerated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since at least 10.2.0, Oracle has decided by default when to invalidate a dependent cursor when query optimizer statistics are gathered. You can determine what setting you have by the following: SQL> select dbms_stats.get_param(&#8216;NO_INVALIDATE&#8217;) from dual; DBMS_STATS.GET_PARAM(&#8216;NO_INVALIDATE&#8217;) &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; DBMS_STATS.AUTO_INVALIDATE SQL>&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2012\/09\/07\/dbms_stats-and-no_invalidate\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[19,22],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/2499"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2499"}],"version-history":[{"count":3,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/2499\/revisions"}],"predecessor-version":[{"id":2502,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/2499\/revisions\/2502"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2499"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}