changeset 2277:39da290b29bb

About removing/collecting statistics.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Tue, 23 Oct 2018 19:01:25 +0300
parents 3662cdbd7b64
children 954eb979bb4d
files oracle.rst
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/oracle.rst	Tue Oct 23 18:42:39 2018 +0300
+++ b/oracle.rst	Tue Oct 23 19:01:25 2018 +0300
@@ -430,7 +430,17 @@
 
   select * from table(dbms_xplan.display);
 
-To get actual execution plan run following after executing query::
+Remove statistics::
+
+  execute DBMS_STATS.DELETE_SCHEMA_STATS('BOB');
+
+Collect statistics::
+
+  execute DBMS_STATS.GATHER_DATABASE_STATS;
+  execute DBMS_STATS.GATHER_SCHEMA_STATS('BOB');
+  execute DBMS_STATS.GATHER_TABLE_STATS('BOB', 'EMPLOYEE');
+
+Get actual execution plan of query after executing query::
 
   select * from table(dbms_xplan.display_cursor);
   select * from table(dbms_xplan.display_cursor(format => 'basic'));