daily pastebin goal
76%
SHARE
TWEET

Does dbms_stats.gather_table_stats issue commit?

ExaGridDba May 17th, 2017 (edited) 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. QUESTION
  2. ========
  3.  
  4. Does dbms_stats.gather_table_stats issue commit?
  5.  
  6. SESSION 1
  7. =========
  8.  
  9. SQL> create table t ( n number );
  10.  
  11. Table created.
  12.  
  13. SQL> insert into t ( n ) values ( 0 );
  14.  
  15. 1 row created.
  16.  
  17. SESSION 2
  18. =========
  19.  
  20. SQL> select n from t;
  21.  
  22. no rows selected
  23.  
  24. SESSION 1
  25. =========
  26.  
  27. SQL> exec dbms_stats.gather_table_stats( null, 'T' )
  28.  
  29. PL/SQL procedure successfully completed.
  30.  
  31. SESSION 2
  32. =========
  33.  
  34. SQL> select n from t;
  35.  
  36.          N
  37. ----------
  38. 0
  39.  
  40. ANSWER:
  41. =======
  42. Yes, it does.
  43.  
  44. Observed on 11.1 and 12.1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top