troubleshooting Question

to the get counts of the table faster

Avatar of gs79
gs79 asked on
Oracle Database
9 Comments2 Solutions438 ViewsLast Modified:
I am using a dynamic sql to get the counts of all the tables by passing the table name as follows:

 v_str := 'SELECT COUNT(*) FROM ' || p_table;

Since some of the tables are huge, and contains millions of rows, getting the counts of some of the tables is taking longer and hence the over process is taking a lot of time..

Is there a way to get the count of the tables faster.In other words .is there a way to speed up the below query by using hints or any other means


select count(*) from TABLE_ABC

I know we can get the row count roughly by querying the ALL_TABLES dictrionary table but these numbers will not be accurate as we analyze the tables once a week..

Thanks
ASKER CERTIFIED SOLUTION
ajexpert

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros