How to get the list of busiest tables (insert, update) in Oracle
To obtain a rough list of tables with more movements of the database can query the table contents and cross dba_tables the current status of each table in the database. This may make sense when we make a list of tables that must be updated periodically or statistics we control the amount of information generated by a particular application. The data we get from each table are always compared to the previous analysis of the same.
The following way is a little "rock" but useful at a time:
- We connect to the database as system and run the following query that will return a list of selects with all tables in the database (it is better not to include filtered to the system tables or include only a particular user .)In the example we will get only those of a particular user:
select 'select''' | | table_name | |'''as TABLE,''' | | sysdate | |
'''As FECHA_ACTUAL,''' | | last_analyzed | |
'''As ULTIMO_ANALISIS, count (*) as COUNT,' | | num_rows | |
'As RECUENTO_ANALISIS, to_date (''' | | sysdate | |
''',''DD / MM / YYYY'') - to_date (''' | | last_analyzed | |
''','' DD / MM / YYYY'') as DIAS_DESDE_ANALISIS, count (*) - '| | num_rows | |
'As DIFERENCIA_RECUENTO (count (*) -' | |
num_rows | | ') / (to_date (''' | | sysdate | |
''',''DD / MM / YYYY'') - to_date (''' | | last_analyzed | |
''','' DD / MM / YYYY'')) as INCREMENTO_DIARIO from '| | owner | |'. " | |
table_name | | 'union'
from dba_Tables
WHERE owner = 'USER'Example of the result with plsql:

- Copy the entire column to the clipboard and remove the last union. Obtain the following result:
We can see the table with data from the latest analysis of the table regarding the current and the variation with average daily number of records (taking into account that an insert (1row) + delete (1row) = 0movimientostaprix.com / sites / all / modules / fckeditor / fckeditor / editor / images / smiley / msn / tounge_smile.gif "alt =" "/>)
If we add other information such as sizes of row, if the table has indexes and what happens to us we can make other "craft" as accumulating these results in a table to see what's happening in our database. Of course, everyone can adapt this technique to your liking for your needs 
+ ========= >>
- Oracle 10g: Statistics craft our database over time
- Build scripts with the help of the dictionary
- Oracle Flashback Query
- SQL08: Update table statistics dynamically throughout a database
- 3.5. Using databases
- SQL08: Synchronizing Database Microsoft Dynamics AX 2009 on SQL Server 2008
- SQL08: Synchronization Database Microsoft Dynamics AX 2009 on SQL Server 2008
- SQL08: Update table statistics dynamically throughout a database
- Defragment to optimize MySQL tables
- Defragment to optimize MySQL tables
