Count all records in all tables
I need some help with this. I was able to count all the records in our
database using the user_tables and user_tab_columns tables after
refreshing the statistics on this database.
We are doing an upgrade of a system and I will not be able to refresh
the statistics during the upgrade. I need more of a manual process of
running these queries.
Now I do:
select A.table_name, round(A.num_rows,0) as rowcount,
count(b.table_name) as ColumnCount
from dba_tables A, dba_tab_columns B
where A.table_name = B.table_name and A.owner in ('PS','SYSADM')
group by A.table_name, A.num_rows
order by rowcount desc, columncount desc
But I can't use the num_rows anymore so I was thinking more to do this:
Select A.table_name from
(select count(*) from A.Table_name B where A.Table_name =
B.Table_Name)
from user_table
This does not work for me since I don't know how to pass the table_name
from the first select to the second select. The logic is there but the
syntax is not.
Please help.
.
Relevant Pages
- Count all records in all tables
... refreshing the statistics on this database. ... countas ColumnCount ... (comp.databases.ms-sqlserver) - Re: Count all records in all tables
... | refreshing the statistics on this database. ... | select A.table_name, roundas rowcount, ... | countas ColumnCount ... (comp.databases.oracle.misc) - Re: Access unter Citrix - Probleme beim Komprimieren
... Hat mir doch keine Ruhe gelassen, war ja auch nicht in MSDN oder KB, sondern in der TechNet drin: Microsoft Jet Database Engine Programmer's Guide, Chapter 4. ... The optimizer in the Jet database engine is a cost-based optimizer, which means the optimizer assigns a cost to each task and then chooses the least expensive list of tasks to perform that will generate the desired result set. ... The algorithms that the optimizer uses depend on the accuracy of the statistics provided by the underlying engine. ... Each time you prepare a request for information, either by sending an SQL statement as an argument to the OpenRecordset method of a Database object or by saving a QueryDef object in your database, Microsoft Jet runs through a complex series of analysis and optimization steps. ... (microsoft.public.de.access) - Re: Access unter Citrix - Probleme beim Komprimieren
... Microsoft Jet Database Engine Programmer's Guide, ... The optimizer is one of the most complex components of the query engine. ... uses statistics to determine the most efficient way to execute a query. ... Each time you prepare a request for information, ... (microsoft.public.de.access) - Need to aggregate t-test stats
... My main goal is to "bless" a new database such ... "name" lengths for each country. ... them would have high p-values (seems like a great way to ... statistics obtained from all the different tests and compare ... (sci.stat.math) |
|