Advertisement
ExaGridDba

Does dbms_stats.gather_table_stats issue commit?

May 17th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement