Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First off, I would generally caution that gathering table statistics in order to do space analysis is a potentially dangerous thing to do. Gathering statistics may change query plans, particularly if the DBA has configured a statistics gathering job that uses non-default parameters that your call is not using, and will cause Oracle to re-parse queries that utilize the table in question which can be a performance hit. If the DBA has intentionally left some tables without statistics (common if your <code>OPTIMIZER_MODE</code> is CHOOSE), gathering statistics can cause Oracle to stop using the rule-based optimizer and start using the cost-based optimizer for a set of queries which can be a major performance headache if it is done unexpectedly in production. If your statistics are accurate, you can query <code>USER_TABLES</code> (or <code>ALL_TABLES</code> or <code>DBA_TABLES</code>) directly without calling <code>GATHER_TABLE_STATS</code>. If your statistics are not accurate, there is probably a reason for that and you don't want to disturb the status quo.</p> <p>Second, the closest equivalent to the SQL Server <code>sp_spaceused</code> procedure is likely Oracle's <code>DBMS_SPACE</code> package. Tom Kyte has a nice <a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:231414051079" rel="noreferrer"><code>show_space</code> procedure</a> that provides a simple interface to this package and prints out information similar to what <code>sp_spaceused</code> prints out.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload