Solved

Generate table stats on External tables

Posted on 2013-12-10
4
386 Views
Last Modified: 2013-12-11
Can we generate table statistics on Oracle external table, please suggest.
0
Comment
Question by:d27m11y
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
JJSmith earned 250 total points
ID: 39710325
Following statement should work on external table SCOTT.EXT_TABLE :

DBMS_STATS.GATHER_TABLE_STATS (
Ownname           => 'SCOTT',
Tabname           => ‘EXT_TABLE’,
estimate_percent  => NULL,
degree      => 4);
0
 

Author Comment

by:d27m11y
ID: 39710356
Looking above, I understand that the syntax looks same as regular tables. May I know what exactly degree above means and why is it set to 4 ?

Thank you !
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 39710406
To confirm the above generic syntax, the docs seem to imply it can be performed on an external table:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN12897

From the docs:
The ANALYZE statement is not supported for gathering statistics for external tables. Use the DBMS_STATS package instead.

>>May I know what exactly degree above means and why is it set to 4 ?
Again the online docs:
docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_stats.htm#ARPLS68583

degree  Degree of parallelism
0
 
LVL 6

Expert Comment

by:JJSmith
ID: 39712687
Simply put degree (of Parallelism) - will break down the stats queries into multiple processes which can be run concurrently depending, of course, on the fact that you have multiple CPUs/cores. You get your results quicker!

The import bit in the procedure call that I put up is that the estimate_percent is set to NULL if you have version 10.2; it's OK to use values if you have 9 or 11.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now