Best Practices for Performance Part 1.NET and Oracle Database

Similar documents
Best Practices for Performance

Oracle and.net: Best Practices for Performance. Christian Shay & Alex Keh Product Managers Oracle October 28, 2015

Best Practices for Performance Part 2.NET and Oracle Database

What s New for.net Developers in Oracle Database

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Oracle and.net Introduction and What s New. Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Getting Started with Oracle and.net

Getting Started with Oracle and.net

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

PL/SQL Programming for.net Developers: Tips, Tricks, and Debugging. Christian Shay Product Manager, Oracle

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

<Insert Picture Here> Getting Started with Oracle and.net

Using.NET Core and Entity Framework Core Linux/Windows with Oracle Database

<Insert Picture Here> What's New for.net Developers for Oracle Database

What s New with Oracle Database 12c on Windows: On-Premises and in the Cloud

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

<Insert Picture Here> Scale your PHP Application to Tens of Thousands of Connections

Pro ODP.NET for Oracle. Database 11 g. Edmund Zehoo. Apress

What s New for Oracle Database 11gR2 on Windows?

Maximum Availability Architecture (MAA): Oracle E-Business Suite Release 12

The Fastest and Most Cost-Effective Backup for Oracle Database: What s New in Oracle Secure Backup 10.2

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

<Insert Picture Here> Maximizing Database Performance: Performance Tuning with DB Time

NoSQL + SQL = MySQL Get the Best of Both Worlds

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

2008 Oracle Corporation

Successful Upgrade Secrets: Preventing Performance Problems with Database Replay

Oracle Net Services 12c Best Practices for Database Performance and Scalability

Oracle Recovery Manager Tips and Tricks for On-Premises and Cloud Databases

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Connecting your Microservices and Cloud Services with Oracle Integration CON7348

Copyright 2018, Oracle and/or its affiliates. All rights reserved.

ZDLRA High Availability for Backup and Recovery

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

Session id: The Self-Managing Database: Guided Application and SQL Tuning

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Using Automatic Workload Repository for Database Tuning: Tips for Expert DBAs. Kurt Engeleiter Product Manager

Create a DBaaS Catalog in an Hour with a PaaS-Ready Infrastructure

Press Release Writing Tips and Tricks for the Enterprise Technology Space

Consolidate and Prepare for Cloud Efficiencies Oracle Database 12c Oracle Multitenant Option

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

Help Us Help You - TFA Collector and the Support Tools Bundle

Oracle 1Z0-054 Exam Questions and Answers (PDF) Oracle 1Z0-054 Exam Questions 1Z0-054 BrainDumps

OpenWorld Supply Orchestration Troubleshooting Tips For Supply Chain Management Cross Functional Flows

Putting Oracle Database 11g to Work for Java. Kuassi Mensah Group Product Manager, Java Platform Group db360.blogspot.com

Net Services - Best Practices for Database Performance, Scalability and High-Availability

SQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability

TipsandTricks. Jeff Smith Senior Principal Product Database Tools, Oracle Corp

<Insert Picture Here> Active Directory and Windows Security Integration with Oracle Database

Using Active Session History for Performance Tuning: Advanced Topics in Performance Diagnostics

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8

Copyright 2018, Oracle and/or its affiliates. All rights reserved.

Data-and-Compute Intensive Processing: Middle-tier or Database? Trade-Offs and Case Study. Kuassi Mensah Marcelo Ochoa Oracle

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

Top Oracle Database 11g High Availability Best Practices

Multitenancy and Continuous Availability for Java Applications Oracle Database 18

OpenWorld 2018 SQL Tuning Tips for Cloud Administrators

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

<Insert Picture Here> DBA s New Best Friend: Advanced SQL Tuning Features of Oracle Database 11g

Manage Change With Confidence: Upgrading to Oracle Database 11g with Oracle Real Application Testing

What every DBA needs to know about JDBC connection pools Bridging the language barrier between DBA and Middleware Administrators

Understanding Oracle RAC ( ) Internals: The Cache Fusion Edition

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

Oracle NoSQL Database at OOW 2017

<Insert Picture Here> Oracle SQL Developer: PL/SQL Support and Unit Testing

What Are They Talking About These Days? Analyzing Topics with Graphs

Announcing Oracle Secure Backup 10.3: Fastest, Most Cost-Effective Oracle Backup

Oracle Multitenant What s new in Oracle Database 12c Release ?

Oracle EXAM - 1Z Oracle Database 11g: Performance Tuning. Buy Full Product.

Global Data Services (GDS)

Oracle Database In-Memory What s New and What s Coming

Oracle APEX 18.1 New Features

Application High Availability with Oracle

Optimize Java Persistence, Scale and Failover Connections with JDBC and UCP

Configuring the Oracle Network Environment. Copyright 2009, Oracle. All rights reserved.

Oracle SQL Developer & REST Data Services

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

SQL Tuning for Expert DBAs

Oracle Secure Backup: Achieve 75 % Cost Savings with Your Tape Backup

Oracle Database 18c and Autonomous Database

DBAs can use Oracle Application Express? Why?

Personalized Experiences Enabled Through Extensibility

Oracle Database 11g Production Case Study: Porting to Oracle Database 11 - Tips, Techniques, and Experiences

<Insert Picture Here> Maximum Availability Architecture (MAA) Best Practices: Online Patching and Rolling Upgrades with Oracle Database

<Insert Picture Here> Reduce Problem Resolution Time with Oracle Database 11g Diagnostic Framework

<Insert Picture Here> Automate Your E-Business Suite Testing With Oracle Application Testing Suite

Pega 7 Webinar Series

Develop Python Applications with MySQL Connector/Python DEV5957

Toad as a SQL Tuning Tool. With Dan Hotka - Oracle ACE Director

Safe Harbor Statement

Sessions Related to Database High Availability

Best Practices for Speeding and Scaling Java Applications Oracle Database 18

Oracle Enterprise Manager 12c IBM DB2 Database Plug-in

A RESTful Java Framework for Asynchronous High-Speed Ingest

Power your cloud infrastructure with Oracle VM and Cisco!

SQLDevTipsTricks. Jeff Smith Senior Principal Product Database Tools, Oracle Corp

Cloud Consolidation with Oracle (RAC) How much is too much?

Transcription:

Best Practices for Performance Part 1.NET and Oracle Database Alex Keh Christian Shay Product Managers Server Technologies September 19, 2016

Program Agenda 1 2 3 4 Optimization Process ODP.NET Performance Part 2 Preview Q+A 3

Optimization Process End to End Oracle.NET performance management 4

Oracle.NET Application Performance Optimization Steps.NET data access tuning Use ODP.NET best practices SQL tuning Use SQL Tuning Advisor in Visual Studio Database tuning under real world conditions Oracle Performance Analyzer in Visual Studio detects issues you have missed May need to modify application based on findings Can be used during testing phase or production

Optimizing ODP.NET Performance ODP.NET 6

General All ODP.NET Objects Close/Dispose all ODP.NET objects explicitly Garbage collector cannot reliably implicitly dispose objects under heavy load May see increasing memory usage Can use Using statement instead Recommended for all ODP.NET objects 7

Connections Use connection pooling Min Pool Size = # connections at steady state or average load Max Pool Size = # connections at maximum capacity Min and Max Pool Size always obeyed over other CP attributes See documentation for connection pooling parameter options ODP.NET performance counters Monitor with Windows Performance Monitor More granularity in monitoring New in ODAC 12c Monitor at app domain, pool, or DB instance level See documentation for details on how to enable Confidential Oracle Internal/Restricted/Highly Restricted 8

Connections New in ODAC 12.2 Connection pool tagging Identify connections with specific settings using tags i.e. American users or French users i.e. gold customers or platinum customers ODP.NET searches pool for matching tag and retrieves that connection to be opened No round trips to set session settings for every new connection Database Resident Connection Pooling (DRCP) Server side connection pool that optimizes memory use Pools "dedicated" servers Confidential Oracle Internal/Restricted/Highly Restricted 9

New.NET Features Upcoming Session OOW session: What s New for.net Developers in Oracle Database Thursday, Sep 22, 1:15 PM Park Central Hotel Concordia Room 10

Connection Management RAC, Data Guard, GoldenGate, and GDS Fast Application Notification (FAN) infrastructure ODP.NET 12c (mostly) uses Oracle Notification Service (ONS) ONS delivers FAN events faster than previous AQ infrastructure Run-time connection load balancing Automated load balancing at connection dispense time Better performance because dispense based on real-time load Set Load Balancing = true in connection string Now the default in ODP.NET 12.2 11

Connection Management High Availability Fast Connection Failover Severed connections and returned connections automatically removed from pool End users no longer receive invalid connections after a failure Works for planned and unplanned outages Set HA Events = true in connection string Now the default in ODP.NET 12.2 For Data Guard switchover ODP.NET ServiceRelocationConnectionTimeout setting pauses incoming connection requests until standby is up End users will not see connection timeout errors 12

More HA Connection Management OOW session: Best Practices for High Availability:.NET and Oracle Database session Thursday, Sep 22, 2:30 PM Park Central Hotel Concordia Room 13

Oracle Client Performance Tips Tuning Options Set Outside ODP.NET Server side connection pooling types Dedicated server Shared server Database Resident Connection Pooling (DRCP) New for ODAC 12.2c Connect time load balancing Connects to least loaded instance/database when pool is created 14

Oracle Client Performance Tips Tuning Options Set Outside ODP.NET Oracle Net Services packet size Optimize connection s Session Data Unit (SDU) size Increase DEFAULT_SDU_SIZE in SQLNET.ORA or SDU in TNSNAMES.ORA If SDU settings between client and server do not match, lower value will be used OOW session: Best Practices for Oracle Database Performance on Windows Monday, Sep 19, 5:30 PM Park Central Hotel Olympic Room 15

Commands Bind Variables Prevents re-parsing of frequently executed statements Works with SQL and PL/SQL statements Improves subsequent command executions Literal value changes forces a re-parse and re-optimization Literal values should become bind variables Executed statements stored in Oracle shared pool Re-parsing and re-optimization uses CPU and requires shared pool locks 16

Commands Statement Caching Retains previously parsed statement in shared pool Prevents repeated parsing in server Caches most recently used statements Works with SQL and PL/SQL statements Best with bind variables Self-tuned cache size on by default No code changes needed 17

Commands Data Retrieval Control how much data is retrieved per DB roundtrip Too much data retrieved excessive client-side memory used Too little data retrieved additional round trips Use OracleCommand.RowSize and OracleDataReader.FetchSize to control result size RowSize populated after statement execution Can be set dynamically at run-time FetchSize can be set as multiple of RowSize 18

D E M O N S T R A T I O N Fetch Size and Row Size

Commands Data Updates Statement batching Use OracleDataAdapter.UpdateBatchSize to batch updates from DataSet Execute multiple commands in one DB roundtrip By using anonymous PL/SQL 20

Commands Mass Data Movement with Arrays PL/SQL associative arrays Pass large amounts of data between.net and DB of the same data type Use parameter array binding Useful if executing the same statement multiple times Bind variables are the same, variable values can be different One execution for each element in the bound array 21

Promotable Transactions Promote local transactions to distributed at run time Better application performance Lower resource usage On by default Requirements Requires Oracle Database 11g (11.1.0.7+) and ODAC 11.1.0.7.20+ Subsequent connections to any other version or database 22

REF Cursors OracleRefCursor class Defers result set retrieval until needed Retrieve data as needed Control data retrieved via FetchSize Fill a DataSet with just a portion of the REF Cursor result Usage Can create REF Cursors as part of an anonymous PL/SQL block Can return REF Cursors from stored procedures Can pass REF Cursors to database as input stored procedure parameters 23

SecureFiles and LOBs Data retrieval options Control amount of data returned with OracleCommand.InitialLOBFetchSize Retrieve a chunk using OracleClob and OracleBlob classes Read method Use Search method to find data to be retrieved Update/Insert/Delete SQL statements acting on LOBs Modify LOB without retrieving the data to the client side Uses LOB locator VARCHAR2, NVARCHAR2, and RAW now support up to 32 KB ODP.NET 12c and Oracle DB 12c enhancement 24

Coming Up in Best Practices Part 2 Thursday, Sep 22, 10:45 a.m. Marriott Marquis - Salon 10/11 25

Oracle.NET Caching Solutions Oracle.NET client-side DB caches Client Result Cache Continuous Query Notification (CQN) TimesTen In-Memory Database 26

Tuning with Oracle Developer Tools For Visual Studio Oracle Performance Analyzer SQL Tuning Advisor

Come See the SQL I mean, Sequel ;-) Coming to an OpenWorld Near You OOW session: Best Practices for Performance Part 2:.NET and Oracle Database Thursday, Sep 22, 10:45 AM Marriott Marquis Hotel - Salon 10/11 Rooms 28

Additional Oracle.NET Resources OTN otn.oracle.com/dotnet Twitter twitter.com/oracledotnet YouTube youtube.com/oracledotnetteam Email alex.keh@oracle.com and christian.shay@oracle.com

Upcoming.NET Sessions Meet the Oracle Programming and Scripting Experts Tuesday 6:15 PM Moscone South - 310 Best Practices for Performance Part 2:.NET and Oracle Database Thursday- 10:45 AM Marriott Marquis - Salon 10/11 PL/SQL Programming for.net Developers: Tips, Tricks, and Debugging Thursday 12:00 PM Marriott Marquis - Salon 10/11 What s New for.net Developers in Oracle Database Thursday 1:15 PM Park Central - Concordia Best Practices for High Availability:.NET and Oracle Database Thursday 1:15 PM Park Central Concordia

Demogrounds Visit Windows experts at the Demogrounds: Oracle Database 12c:.NET Development and Windows Platform Integration Today through Wednesday Moscone South Exhibition Hall, far left by walkway Booth SDB-003

Q&A 32

Safe Harbor Statement The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle. 33

34