Hi All,
Buzzzz !!!
From some time back, I was working on Oracle object dependencies. Oracle itself, is the director of all dependencies. I have compiled some of the concepts like dependency checks and verification, Fine grained concepts and version enhancements. Got the same published with Exforsys Inc. Check the same and post your queries/feedback/comments.
http://www.exforsys.com/tutorials/oracle-11g/manage-oracle-dependencies.html
Surely, it must thrust you to dig more into it. I shall be happy to see the reviews.
Over for now, SBH
Wednesday, 17 August 2011
Thursday, 11 August 2011
UTL_FILE
Hi All,
Hope u all r doing well !!
Check out my latest publication on UTL_FILE at Exforsys Inc
Working with UTL_FILE
Do post your feedbacks and queries.
Thanks !!
Bye, SBH
Hope u all r doing well !!
Check out my latest publication on UTL_FILE at Exforsys Inc
Working with UTL_FILE
Do post your feedbacks and queries.
Thanks !!
Bye, SBH
Sunday, 10 July 2011
Pragmas in Oracle
Hi Guyzz,
Check my publication at exforsys.com on Oracle Pragmas, updated until 11g version.
http://www.exforsys.com/tutorials/oracle-11g/oracle-pragma.html
I shall be happy to improvise upon your responses. Thanks !!
Bye for now-SBH
Check my publication at exforsys.com on Oracle Pragmas, updated until 11g version.
http://www.exforsys.com/tutorials/oracle-11g/oracle-pragma.html
I shall be happy to improvise upon your responses. Thanks !!
Bye for now-SBH
Wednesday, 29 June 2011
Conditional compilation in Oracle PL/SQL
Hi all,
Check out my latest publication at Exforsys.
Conditional compilation in Oracle PL/SQL.
Do read it and post your feedback.
Thanks, SBH
Check out my latest publication at Exforsys.
Conditional compilation in Oracle PL/SQL.
Do read it and post your feedback.
Thanks, SBH
Saturday, 18 June 2011
Overloading in Oracle
Hi,
Overloading is a generic concept for a programming language. In conventional terms, it implies the different behavior of like named objects upon different calls. Different languages provide add ons upon overloading implementation, depending upon their language support and featured concepts.
I have recently got my article published at exforsys.com. Check it out the below link.
Oracle program overloading
Do post your feedback and comments.
Bye, SBH
Overloading is a generic concept for a programming language. In conventional terms, it implies the different behavior of like named objects upon different calls. Different languages provide add ons upon overloading implementation, depending upon their language support and featured concepts.
I have recently got my article published at exforsys.com. Check it out the below link.
Oracle program overloading
Do post your feedback and comments.
Bye, SBH
Related articles
- More About Classes - Operator Overloading & Aggregation (codingexplorer.wordpress.com)
- Check out "Recalling Oracle subprograms" on Oracle Community (sbhoracle.wordpress.com)
Thursday, 16 June 2011
Read Only tables explained
Hi guyzz,
Check out my new online work at exforsys on Oracle 11g Read Only tables
Read Only Tables
Don't forget to post your feedback. These days bit busy with Object model, I'll be back soon with many more findings on Oracle stuffs.
Bye for now-SBH
Check out my new online work at exforsys on Oracle 11g Read Only tables
Read Only Tables
Don't forget to post your feedback. These days bit busy with Object model, I'll be back soon with many more findings on Oracle stuffs.
Bye for now-SBH
Related articles
- Oracle Exadata Gains Certification for SAP Applications (pcworld.com)
- Check out "Invisible indexes" on Oracle Community (sbhoracle.wordpress.com)
Thursday, 9 June 2011
Oracle 11g Exception Handling
Check Exception Handling in Oracle 11g
http://www.exforsys.com/tutorials/oracle-11g/oracle-11g-exception-handling.html#.TfCvs_6fqIM;email
---
This message was sent by sbh.ietk@gmail.com via http://addthis.com. Please note that AddThis does not verify email addresses.
http://www.exforsys.com/tutorials/oracle-11g/oracle-11g-exception-handling.html#.TfCvs_6fqIM;email
---
This message was sent by sbh.ietk@gmail.com via http://addthis.com. Please note that AddThis does not verify email addresses.
Wednesday, 8 June 2011
Check out "Recalling Oracle subprograms" on Oracle Community
|
Thursday, 2 June 2011
Oracle 11g Collections
Check out my new publication at exforsys.com
Oracle 11g Collections.
Do post your feedbacks.
Thanks - SBH
Oracle 11g Collections.
Do post your feedbacks.
Thanks - SBH
Monday, 30 May 2011
Check out "Invisible indexes" on Oracle Community
|
Tuesday, 26 April 2011
Oracle Hints
Introduction
Performance is one of the primary objectives of a database. Fine tuned data retrieval and database operations can save lot of time for users and avoid troubleshoot nightmares of database developers.
The root cause of database performance degradation lies with the working of optimizer. Optimizer speed lowers and hence the query speed. There are multiple approaches and many ways to achieve database process performance. Thorough analysis of the data, explain plan is required to adopt the most feasible method to tune a SQL query.
Out of these many approaches, Oracle SQL hints are one of the tricks to tune a query. SQL hints are optimizer directives which were introduced in Oracle 8.1.0 release. They instruct optimizer to follow an alternative path of query execution. At times, a developer can analyze a complex data better than an Optimizer. Therefore, he may choose a better execution plan than the optimizer by enforcing hints in the queries. Like other approaches, it is not a full proof method of tuning but it is suggestible in case of complex queries.
SQL Hints Usage Below are some situations when Hints are required to be used when the Optimizer fails:-
Other circumstances where the use of Hints may be required:-
Note: - Sometimes, the optimizer can ‘lock’ the statistics when they look ideal. In such a case ‘Hints’ lose their importance.
Syntax:- Hints appear as comments to the SELECT and DML statements. Without these keywords, they hold no meeting and would only appear as a comment. Hints can be used in any of the following ways:
Notes
Illustration
1. The query below uses ALL_ROWS hint to select employee details from EMPLOYEE table
2. The SQL query below uses RULE hint to change the optimizer mode from COST based to RULE based
3. The FULL hint used in the below SQL query enforces optimizer to do FULL TABLE SCAN
Types of Hints
Based on their usage area, SQL hints can be classified as below.
Hints for Access Paths
Hints for Query Transformations
Hints for Join Operations
Hints for Parallel Execution
Miscellaneous Hints
Hint introduced in Oracle 11g
RESULT_CACHE – The hint was introduced to cache the result of the SELECT query for the same set of inputs and values. It results in better performance if the same query has to be executed for multiple numbers of times.
Undocumented Hints
Obsolete Hints RULE – Its usage has been deprecated by Oracle after 9i release. Earlier, it used to work similar to the current COST hint i.e. to toggle over the optimizers.
Performance is one of the primary objectives of a database. Fine tuned data retrieval and database operations can save lot of time for users and avoid troubleshoot nightmares of database developers.
The root cause of database performance degradation lies with the working of optimizer. Optimizer speed lowers and hence the query speed. There are multiple approaches and many ways to achieve database process performance. Thorough analysis of the data, explain plan is required to adopt the most feasible method to tune a SQL query.
Out of these many approaches, Oracle SQL hints are one of the tricks to tune a query. SQL hints are optimizer directives which were introduced in Oracle 8.1.0 release. They instruct optimizer to follow an alternative path of query execution. At times, a developer can analyze a complex data better than an Optimizer. Therefore, he may choose a better execution plan than the optimizer by enforcing hints in the queries. Like other approaches, it is not a full proof method of tuning but it is suggestible in case of complex queries.
SQL Hints Usage Below are some situations when Hints are required to be used when the Optimizer fails:-
- Bugs
- Use of Bind Variables which disable Histograms
- Poorly written SQLs
- High frequency of Change of Data
- Faulty (incomplete) Configuration Settings
- Dynamic vs. Static SQL
Other circumstances where the use of Hints may be required:-
- Hints can be used to join external tables.
- Hints can be used to force the optimizer to choose different join paths which will fetch different results in the query execution.
- Hints are used to tell the optimizer which data access method to use (as for example in a flashback query). The method may be a full table scan or a different index.
Note: - Sometimes, the optimizer can ‘lock’ the statistics when they look ideal. In such a case ‘Hints’ lose their importance.
Syntax:- Hints appear as comments to the SELECT and DML statements. Without these keywords, they hold no meeting and would only appear as a comment. Hints can be used in any of the following ways:
- /*+ hint */
- /*+ hint (argument) */
- /*+ hint (argument-1 argument-2) */
Notes
- Hints can be used in SELECT, INSERT, UPDATE or DELETE statements
- It can be a part of subquery too
- It can appear in any of the participating queries of a compound query using SET operator
- There should be no schema names in hints
- All hints except the /*+ rule */ cause the Cost Based Optimizer (CBO) to be used
- Hints operate on a simple view but not on a complex view
Illustration
1. The query below uses ALL_ROWS hint to select employee details from EMPLOYEE table
SELECT /*+ ALL_ROWS */ EMPNO, ENAME, SALARY, DETPNO
FROM EMPLOYEE WHERE EMPNO=1002. The SQL query below uses RULE hint to change the optimizer mode from COST based to RULE based
SELECT /*+ RULE */ EMPNO, ENAME, SALARY, DETPNO FROM EMPLOYEE WHERE EMPNO=1003. The FULL hint used in the below SQL query enforces optimizer to do FULL TABLE SCAN
SELECT /*+ FULL(E) */ EMPNO, ENAME, SALARY FROM EMPLOYEE E WHERE DEPTNO IN (SELECT DEPTNO FROM DEPARTMENT WHERE LOCATION_ID=1009)Types of Hints
Based on their usage area, SQL hints can be classified as below.
- Hints for Optimization Approaches and Goals
- Hints for Access Paths, Hints for Query Transformations
- Hints for Join Orders
- Hints for Join Operations
- Hints for Parallel Execution
- Additional Hints
| Hints for Optimization Approaches and Goals | ||
| Hint | Function | Use |
| ALL_ROWS | Invokes the CBO | Used for batch processing, data warehousing systems |
| FIRST_ROWS | Invokes the CBO | Used for On Line Transfer Processing (OLTP) systems |
| CHOOSE | Invokes the CBO | It lets the server choose between ALL_ROWS and FIRST_ROWS, based on the statistics gathered by the CBO |
Hints for Access Paths
| CLUSTER | INDEX | INDEX_FFS |
| FULL | INDEX_ASC | INDEX_JOIN |
| HASH | INDEX_COMBINE | NO_INDEX |
| ROWID | INDEX_DESC | AND_EQUAL |
Hints for Query Transformations
| FACT | NO_FACT |
| MERGE | NO_MERGE |
| NO_EXPAND | NOREWRITE |
| NO_EXPAND_GSET_TO_UNION | REWRITE |
| USE_CONCAT | STAR_TRANSFORMATION |
Hints for Join Operations
| DRIVING_SITE | MERGE_AJ | USE_HASH |
| HASH_AJ | MERGE_SJ | USE_MERGE |
| HASH_SJ | NL_AJ | USE_NL |
| LEADING | NL_AJ |
Hints for Parallel Execution
| NO PARALLEL |
| PARALLEL |
| NOPARALLEL_INDEX |
| PARALLEL_INDEX |
| PQ_DISTRIBUTE |
Miscellaneous Hints
| ANTIJOIN | DYNAMIC_SAMPLING |
| APPEND | INLINE |
| BITMAP | MATERIALIZE |
| BUFFER | NO_ACCESS |
| CACHE | NO_BUFFER |
| CARDINALITY | NO_MONITORING |
| CPU_COSTING | NO_PUSH_PRED |
| NO_PUSH_SUBQ | ORDERED_PREDICATES |
| NO_QKN_BUFF | PUSH_PRED |
| NO_SEMIJOIN | PUSH_SUBQ |
| NOAPPEND | NOCACHE |
| STAR | SEMIJOIN |
| SWAP_JOIN_INPUTS | SEMIJOIN_DRIVER |
| USE_ANTI | OR_EXPAND |
| USE_SEMI | ORDERED |
| QB_NAME | SELECTIVITY |
Hint introduced in Oracle 11g
RESULT_CACHE – The hint was introduced to cache the result of the SELECT query for the same set of inputs and values. It results in better performance if the same query has to be executed for multiple numbers of times.
Undocumented Hints
| BYPASS_RECURSIVE_CHECK | CURSOR_SHARING_EXACT |
| BYPASS_UJVC | DEREF_NO_REWRITE |
| CACHE_CB | DML_UPDATE |
| CACHE_TEMP_TABLE | DOMAIN_INDEX_NO_SORT |
| CIV_GB | DOMAIN_INDEX_SORT |
| COLLECTIONS_GET_REFS | DYNAMIC_SAMPLING |
| CUBE_GB | DYNAMIC_SAMPLING_EST_CDN |
| SYS_PARALLEL_TXN | SYS_RID_ORDER |
| REMOTE_MAPPED | RESTORE_AS_INTERVALS |
| SYS_DL_CURSOR | NO_UNNEST |
| SQLLDR | USE_TTT_FOR_GSETS |
| NESTED_TABLE_GET_REFS | NESTED_TABLE_SET_SETID |
| NESTED_TABLE_SET_REFS | NO_FILTERING |
| EXPAND_GSET_TO_UNION | PIV_GB |
| FORCE_SAMPLE_BLOCK | TIV_GB |
| GBY_CONC_ROLLUP | SAVE_AS_INTERVALS |
| GLOBAL_TABLE_HINTS | NOCPU_COSTING |
| HWM_BROKERED | PQ_NOMAP |
| NO_PRUNE_GSETS | NO_ORDER_ROLLUPS |
| INDEX_RRS | SCN_ASCENDING |
| INDEX_SS | OVERFLOW_NOMOVE |
| INDEX_SS_ASC | PQ_MAP |
| INDEX_SS_DESC | NO_STATS_GSETS |
| LIKE_EXPAND | UNNEST |
| LOCAL_INDEXES | SKIP_EXT_OPTIMIZER |
| MV_MERGE | PIV_SSF |
| TIV_SSF | IGNORE_ON_CLAUSE |
| IGNORE_WHERE_CLAUSE |
Obsolete Hints RULE – Its usage has been deprecated by Oracle after 9i release. Earlier, it used to work similar to the current COST hint i.e. to toggle over the optimizers.
Related articles
- Understanding Recursive queries (everysolution.wordpress.com)
- dbms_xplan.display_sql_plan_baseline can also lie ! (coskan.wordpress.com)
Thursday, 21 April 2011
Hello Oracle
Hi Techizzzz,
I have started this blog to dump all my key experiences at one place and share the knowledge which may help the professionals from time to time.
I would wish to have your full support and I shall make sure we all have great TechFun here.
We are Oracles !!
SBH
I have started this blog to dump all my key experiences at one place and share the knowledge which may help the professionals from time to time.
I would wish to have your full support and I shall make sure we all have great TechFun here.
We are Oracles !!
SBH
Subscribe to:
Posts (Atom)