Solved

Generate table stats on External tables

Posted on 2013-12-10
4
425 Views
Last Modified: 2013-12-11
Can we generate table statistics on Oracle external table, please suggest.
0
Comment
Question by:d27m11y
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 77

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
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…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
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.
Suggested Courses

623 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