• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Oracle » Oracle Database » How to set table level preference setting

How to set table level preference setting

April 4, 2023 by techgoeasy Leave a Comment

Sometimes, we may need to set the optimizer statistics preferences at the table level. We will check in detail about it

How to set table level preference setting

The DBMS_STATS.SET_TABLE_PREFS procedure is used to set the statistics preferences of the specified table in the specified schema.

Syntax

DBMS_STATS.SET_TABLE_PREFS ( ownname IN VARCHAR2, tabname IN VARCHAR2, pname IN VARCHAR2, pvalue IN VARCHAR2)

Example

exec DBMS_STATS.SET_TABLE_PREFS ( 'SCOTT', 'DEPT', 'DEGREE', 4);

How to check the setting

Suppose we want to check if the settings are in place, then the below procedure can be used to find it out

exec DBMS_STATS.GET_PREFS ( 'DEGREE','SCOTT', 'DEPT');

How to delete the setting

Suppose you want to delete the setting, then the below procedure can be used

exec DBMS_STATS.DELETE_TABLE_PREFS ( 'SCOTT', 'DEPT',' DEGREE');

I hope you find this information helpful and useful

Filed Under: Oracle, Oracle Database

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • Sql plan Management in Oracle
  • SQL Tuning Set in Oracle
  • How to set statistics for Table/index/column in Oracle
  • How to delete statistics from Table/index/column in Oracle
  • How to replace sql plan by another sql id sql plan

Copyright © 2023 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us
x
x