Wednesday, March 20, 2024

A key difference between TP and TPURGENT

Difference between TP and TPURGENT TP


When you are using Autonomous Transaction Processing database, as well as the LOW, MEDIUM and HIGH services that are also present on the Autonomous Data Warehouse offering, there are TP and TPURGENT services that you can use. Difference  as you can see below:


SQL> select plan, group_or_subplan, cpu_p1
  2  from DBA_RSRC_PLAN_DIRECTIVES
  3  where group_or_subplan like '%TP%';

PLAN         GROUP_OR_SUB     CPU_P1
------------ ------------ ----------
OLTP_PLAN    TP                    8
OLTP_PLAN    TPURGENT             12

there is another important difference to be aware of. As the name suggests, TP is designed for “transactional processing” which means the expectation is for short, snappy transactions. A consequence of this, is that there is no capacity to perform operations in parallel when connecting to the TP service, even if you try to force it.


SQL> conn ADMIN/xxxx@myatp_tp
Connected.

SQL> create table t as select * from dba_objects;

Table created.

SQL> select owner, count(*) from t group by owner;

OWNER                            COUNT(*)
------------------------------ ----------
SYS                                 19401
SYSTEM                                472
DBSNMP                                 59
APPQOSSYS                               6
...

43 rows selected.

SQL> select * from dbms_xplan.display_cursor();

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------
SQL_ID  gupp4rhyp22fz, child number 0
-------------------------------------
select owner, count(*) from t group by owner

Plan hash value: 47235625

-----------------------------------------------------------------------------------
| Id  | Operation                  | Name | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------
|   0 | SELECT STATEMENT           |      |       |       |    22 (100)|          |
|   1 |  HASH GROUP BY             |      |    43 |   430 |    22  (14)| 00:00:01 |
|   2 |   TABLE ACCESS STORAGE FULL| T    | 68290 |   666K|    20   (5)| 00:00:01 |
-----------------------------------------------------------------------------------


14 rows selected.

SQL>
SQL> select /*+ parallel */ owner, count(*) from t group by owner;

OWNER                            COUNT(*)
------------------------------ ----------
SYS                                 19401
SYSTEM                                472
DBSNMP                                 59
APPQOSSYS                               6
...

43 rows selected.

SQL> select * from dbms_xplan.display_cursor();

PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------------------------------------------------------------
SQL_ID  caw2nz87gxkja, child number 0
-------------------------------------
select /*+ parallel */ owner, count(*) from t group by owner

Plan hash value: 47235625

-----------------------------------------------------------------------------------
| Id  | Operation                  | Name | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------
|   0 | SELECT STATEMENT           |      |       |       |    22 (100)|          |
|   1 |  HASH GROUP BY             |      |    43 |   430 |    22  (14)| 00:00:01 |
|   2 |   TABLE ACCESS STORAGE FULL| T    | 68290 |   666K|    20   (5)| 00:00:01 |
-----------------------------------------------------------------------------------

Hint Report (identified by operation id / Query Block Name / Object Alias):
Total hints for statement: 1 (U - Unused (1))
---------------------------------------------------------------------------

   0 -  STATEMENT
         U -  parallel

Note
-----
   - automatic DOP: Computed Degree of Parallelism is 1


25 rows selected.

SQL>

Compare that to when you connect to the TPURGENT service. By default, just like the TP service operations are expected to the business transactions and thus no parallelism is activated.


SQL> conn ADMIN/xxxx@myatp_tpurgent
Connected.

SQL> create table t as select * from dba_objects;

Table created.

SQL> select owner, count(*) from t group by owner;

OWNER                            COUNT(*)
------------------------------ ----------
SYS                                 19317
SYSTEM                                472
DBSNMP                                 59
APPQOSSYS                               6
...


44 rows selected.

SQL> select * from dbms_xplan.display_cursor();

PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------------------------------------------------------------
SQL_ID  gupp4rhyp22fz, child number 0
-------------------------------------
select owner, count(*) from t group by owner

Plan hash value: 47235625

-----------------------------------------------------------------------------------
| Id  | Operation                  | Name | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------
|   0 | SELECT STATEMENT           |      |       |       |    23 (100)|          |
|   1 |  HASH GROUP BY             |      |    44 |   440 |    23  (14)| 00:00:01 |
|   2 |   TABLE ACCESS STORAGE FULL| T    | 71476 |   698K|    21   (5)| 00:00:01 |
-----------------------------------------------------------------------------------


14 rows selected.

However, under TPURGENT you can obtain parallel processing should you need it by explicitly nominating it with hint:


SQL> select /*+ parallel */ owner, count(*) from t group by owner;

OWNER                            COUNT(*)
------------------------------ ----------
SYS                                 19317
SYSTEM                                472
DBSNMP                                 59
APPQOSSYS                               6
...


44 rows selected.

SQL> select * from dbms_xplan.display_cursor();

PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------------------------------------------------------------
SQL_ID  caw2nz87gxkja, child number 1
-------------------------------------
select /*+ parallel */ owner, count(*) from t group by owner

Plan hash value: 129087698

--------------------------------------------------------------------------------------------------------------------------
| Id  | Operation                        | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
--------------------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                 |          |       |       |    13 (100)|          |        |      |            |
|   1 |  PX COORDINATOR                  |          |       |       |            |          |        |      |            |
|   2 |   PX SEND QC (RANDOM)            | :TQ10001 |    44 |   440 |    13  (16)| 00:00:01 |  Q1,01 | P->S | QC (RAND)  |
|   3 |    HASH GROUP BY                 |          |    44 |   440 |    13  (16)| 00:00:01 |  Q1,01 | PCWP |            |
|   4 |     PX RECEIVE                   |          |    44 |   440 |    13  (16)| 00:00:01 |  Q1,01 | PCWP |            |
|   5 |      PX SEND HASH                | :TQ10000 |    44 |   440 |    13  (16)| 00:00:01 |  Q1,00 | P->P | HASH       |
|   6 |       HASH GROUP BY              |          |    44 |   440 |    13  (16)| 00:00:01 |  Q1,00 | PCWP |            |
|   7 |        PX BLOCK ITERATOR         |          | 71476 |   698K|    11   (0)| 00:00:01 |  Q1,00 | PCWC |            |
|*  8 |         TABLE ACCESS STORAGE FULL| T        | 71476 |   698K|    11   (0)| 00:00:01 |  Q1,00 | PCWP |            |
--------------------------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   8 - storage(:Z>=:Z AND :Z<=:Z)

Note
-----
   - automatic DOP: Computed Degree of Parallelism is 2


29 rows selected.

SQL>






Autonomous Transaction Processing (ATP)



So its important to be aware of the parallelism facilities defined for MEDIUM and HIGH. We’ll do operations in parallel whenever possible. You get faster queries and faster DML but there are implications on the way you write your scripts, the locking that will result and how commit processing must be handled. HIGH and MEDIUM are not just “bigger” versions of the LOW service.


Predefined Database Service Names for Autonomous Transaction

The predefined service names provide different levels of performance and concurrency for Autonomous Transaction Processing.

  • tpurgent: The highest priority application connection service for time critical transaction processing operations. This connection service supports manual parallelism.
  • tp: A typical application connection service for transaction processing operations. This connection service does not run with parallelism.
  • high: A high priority application connection service for reporting and batch operations. All operations run in parallel and are subject to queuing.
  • medium: A typical application connection service for reporting and batch operations. All operations run in parallel and are subject to queuing. Using this service the degree of parallelism is limited to four (4).
  • low: A lowest priority application connection service for reporting or batch processing operations. This connection service does not run with parallelism.

 For standard transactional activities on ATP, make sure it uses the TP or TPURGENT services. If you need faster performance for volume operations, then HIGH and MEDIUM are your friend, 

but understand the locking and commit implications.



Predefined Database Service Names for Autonomous


 Databases 


Regarding parallelism for different services.



Oracle doc -
























U







R

GENTA key difference between

 TP and TPURGENT

Monday, March 11, 2024

The Fundamental Characteristics of Storage concepts for DBAs.

 ♨️The Fundamental Characteristics of Storage concepts for DBAs.🧩


☑️Conceptual challenges between DBAs and Storage technicians and Developers.


Download and follow the link Below for better understanding 

Storage Concepts

Tuesday, February 27, 2024

EM 12c, 13c: 'CPU Utilization (%) of a cpu' Metric Showing 'No data to display' On All Metrics In EM Console

 EM 12c, 13c: 'CPU Utilization (%) of a cpu' Metric Showing 'No data to display' On All Metrics In EM Console


Login to OEM Console -> Navigate to the Host target -> Monitoring -> All Metrics -> Expand "CPU Usage" -> Select "CPU Utilization (%) of a CPU" -> Select Last 24 Hours next to "View Data"

Last 24 hours' Graphs Data for the "CPU Utilization (%) of a CPU" metric of Host Target is Not Being Displayed in OEM Cloud Control.




 'Usage Type' of 'Use of Metric Data' is setting "Alerting Only".

⇒This setting means, 'Upload Interval' of this metric is「On Alert].



SOLUTION 


1) Change 'Usage Type' of 'Use of Metric Data' is setting from "Alerting Only" to "Alerting and Historical Trending".

2)'Upload Interval' setting  a value except "0". ※The number must be greater than or equal to 1.

3) Click the "OK" button.

4) Wait for 15 minutes and verify the  EM Console, it will show metrics data.




※It can be changed too, in the following in EM console.

Login to OEM Console -> Navigate to the Host target -> Monitoring -> Metric and Collection Settings -> Edit Collection Settings: <Metric_name>


Document ID - 2630530.1

Saturday, February 17, 2024

Oracle Database Deployment: EC2 vs. RDS vs. Custom RDS

 

Oracle Database Deployment: EC2 vs. RDS vs. Custom RDS


Overview

This summary contrasts three deployment models for Oracle databases, assessing control, cost, management, scalability, and availability to guide strategic decision-making.

Deployment Options

Amazon EC2 (Self-Managed Oracle)

  • Control: Maximum, with complete customization.
  • Management: High responsibility; manual updates, maintenance.
  • Cost: Higher due to manual management and operational expenses.
  • Flexibility: Full, manual scalability and availability configurations.
  • Use Case: Niche applications requiring unique configurations or specific Oracle features.

Amazon RDS for Oracle

  • Control: Moderate, with managed service benefits.
  • Management: Lowered by automated tasks (backups, patching).
  • Cost: Reduced through managed services and no upfront hardware investment.
  • Flexibility: Built-in scalability and high availability (Multi-AZ).
  • Use Case: General business applications seeking balance between management ease and customization.

Custom RDS Solution for Oracle

  • Control: High, tailored environment for Oracle.
  • Management: Significant, akin to EC2 but with potential for cloud-agnostic deployment.
  • Cost: Varied, influenced by design complexity and infrastructure choice.
  • Flexibility: Custom-configured for scalability and DR.
  • Use Case: Specific scenarios needing cloud-agnostic setups or advanced Oracle functionalities not available in Amazon RDS.

Key Considerations

  • Operational Overhead vs. Automation: Choose between hands-on control (EC2, Custom RDS) and operational efficiency (Amazon RDS).
  • Cost Implications: Consider long-term TCO, balancing upfront investments against ongoing operational savings.
  • Scalability and Reliability: Weigh the need for manual setup and customization against the convenience of managed scalability and availability.

Recommendation

Aligning with business objectives and IT capabilities is paramount. Amazon RDS for Oracle is recommended for most use cases due to its balance of ease of use, cost-effectiveness, and built-in features. EC2 or Custom RDS may be suited for specialized requirements outside RDS's scope.


For a concise, one-page summary in a comparative format that highlights the differences between Amazon EC2, Amazon RDS for Oracle, and custom RDS solutions for Oracle, a table is an effective way to present the information clearly and facilitate quick comparison. This format supports executive decision-making by directly contrasting key aspects of each option.


Comparative Summary: Oracle Database Deployment Options

CriteriaAmazon EC2Amazon RDS for OracleCustom RDS Solution
ControlMaximum (full OS and DB control)Moderate (managed DB settings)High (customizable environment)
Management EffortHigh (manual setup and maintenance)Low (automated backups, patching)High (requires manual management)
Cost EfficiencyVariable (depends on management and scaling)High (reduced operational costs)Variable (depends on complexity)
ScalabilityManual (requires planning and execution)Automated (easy scaling options)Manual (flexible but complex)
High AvailabilityManual setup (custom HA configurations)Built-in (Multi-AZ for automatic failover)Manual setup (custom HA solutions)
Backup and RecoverySelf-managed (custom backup solutions)Automated (with point-in-time recovery)Self-managed (flexible strategies)
SecuritySelf-managed (custom security measures)Managed (encryption, network isolation)Self-managed (customizable security)
Use CaseSpecialized needs (specific configurations)General business applications (balance of ease and functionality)Specific scenarios (cloud-agnostic or advanced Oracle features)

Key Takeaways

  • Amazon EC2 offers the highest level of control and customization, suited for specialized deployments that require specific Oracle features or configurations not supported by RDS.
  • Amazon RDS for Oracle provides a managed service that balances ease of use with flexibility, ideal for businesses looking for cost-effective and scalable database solutions without the need for extensive database administration.
  • Custom RDS Solution is tailored for unique requirements, offering high control and flexibility, particularly for scenarios demanding cloud-agnostic deployments or leveraging advanced Oracle functionalities beyond RDS capabilities.

Strategic Recommendation

Evaluate business needs, technical requirements, and resource availability to select the most suitable deployment option. Consider Amazon RDS for its operational efficiency and cost benefits for standard applications, while EC2 or custom RDS solutions might be better suited for specialized requirements.bad