- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- PL/Sql block or Oracle Stored proc for row counts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 05:02 AM
тАО12-14-2004 05:02 AM
PL/Sql block or Oracle Stored proc for row counts
I need to get a row count in specific tables using the % (like operator) of some tables that change records frequently. Using the generation of stats and taking num_rows from user_tables requires generating stats frequently and still does not serve my purpose. Does any one have a PL/SQL block of code or stored proc that I can use to get my row counts?
Your help is much appreciated.
Best regards.
-Pankaj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 05:42 AM
тАО12-14-2004 05:42 AM
Re: PL/Sql block or Oracle Stored proc for row counts
Run this script - then run the script created by the spool statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 07:54 AM
тАО12-14-2004 07:54 AM
Re: PL/Sql block or Oracle Stored proc for row counts
I have created several "scripts to create scripts" for my end use in the past and I was wanting to use the PL/SQL for this.
Attached is the code I found that can be used/modified to get the row counts of any table(s)
-Pankaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 08:02 AM
тАО12-14-2004 08:02 AM
Re: PL/Sql block or Oracle Stored proc for row counts
Patti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 03:10 PM
тАО12-14-2004 03:10 PM
Re: PL/Sql block or Oracle Stored proc for row counts
i would still prefer to use DBMS_STATS to gather the statistics. I do that regularly using a scheduled database procedure (DBMS_JOB).
exec dbms_stats.gather_schema_stats( user, options =>
'gather stale');
kind regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 09:35 PM
тАО12-14-2004 09:35 PM
Re: PL/Sql block or Oracle Stored proc for row counts
you can find attached a script we use to count records for tables for a specific schema owner.
Amend schema owner and cursor definition to filter the list of tables yuo want to work with.
Regards
Jean-Luc