SlideShare a Scribd company logo
EEMMBBAARRCCAADDEERROO TTEECCHHNNOOLLOOGGIIEESS 
PL/SQL Tips & Techniques 
Scott Walz | Embarcadero Director of Software Consultants 
Dan Hotka |Author & Instructor |Oracle Ace Director
EMBARCADERO TECHNOLOGIES 
PL/SQL Tips and Techniques 
• Rapid SQL 
– PL/SQL Templates 
• Read my blogs 
– PL/SQL Debugging 
• Prior Webinar 
– PL/SQL Profiling 
• Read my blogs 
• PL/SQL Tips 
– Oracle Overview 
– Compiler Options 
• Includes some useful performance 
Tips for Functions
EMBARCADERO TECHNOLOGIES 
Oracle Architecture 
Default 
Result 
Cache 
(11g) 
Oracle SGA 
Keep 
(optional) 
PGA 
Dedicated 
User 
Processes 
Listener 
Shared Pool 
TNSNAMES.ORA 
LISTENER.ORA 
Tablespaces 
Database Files 
Database Files 
Database Files 
Buffer Pool 
nK 
(Optional) 
Recycle 
(Optional) 
Library 
Cache 
Dictionary 
Cache 
Shared 
SQL 
SQL 
Source 
Exe Plan 
Call 
Stack 
UGA 
Sess 
Data 
Cursor 
Area 
Sort 
Area 
Client 
Result 
Cache 
(11g) 
PL/SQL 
Engine 
SQL Engine 
SQL 
Statement 
External Files 
UTL File 
External Tables 
OCI/JDBC 
URL
EMBARCADERO TECHNOLOGIES 
Oracle Architecture
EMBARCADERO TECHNOLOGIES 
PL/SQL Overview 
• Procedure 
– Does processing 
– Returns a code that the work was successful or not 
– May or may not be passed values 
– May or may not return values 
• Functions 
– Similar to Procedure EXCEPT it does return a value!
EMBARCADERO TECHNOLOGIES 
PL/SQL Overview 
• Packages 
– Grouping related procedures and functions 
– Can share cursors/work areas 
– Code inheritance 
– When one module is accessed…entire package is loaded 
into Oracle 
• Database Triggers 
– Assigned to tables 
– Executes before or after a DML to the table
EMBARCADERO TECHNOLOGIES 
Rapid SQL Templates 
• IF-THEN-ELSE 
– Can nest 250+ Deep 
– ELSE is optional 
– ELSIF is indeed misspelled! 
Ctrl+ Space bar
EMBARCADERO TECHNOLOGIES 
Rapid SQL Templates 
IF_ENDIF IF_ELSIF
EMBARCADERO TECHNOLOGIES 
Rapid SQL Templates
EMBARCADERO TECHNOLOGIES 
Rapid SQL Templates 
• Case 
– Alternative to IF-THEN-ELSE 
– Can nest 250+ Deep 
– ELSE is optional 
Case + Ctrl+ Space bar
EMBARCADERO TECHNOLOGIES 
Rapid SQL Templates 
CASE
EMBARCADERO TECHNOLOGIES 
Rapid SQL Templates
EMBARCADERO TECHNOLOGIES 
PL/SQL Profiling 
• Profiler 
– How long each routine took to execute 
– How long each line of code took to execute 
– RapidSQL has a nice interface 
• Easy to use 
• Highlights performance issues 
– Dan will demonstrate how it works…
EMBARCADERO TECHNOLOGIES 
Rapid SQL Profiler
EMBARCADERO TECHNOLOGIES 
PL/SQL Debugging 
• Debugger: 
– Oracle symbolic debugger 
– Changing variable content on the fly 
– Setting code breakpoints 
– Stepping through code dependencies 
Demo
EMBARCADERO TECHNOLOGIES 
Stored Programs Syntax 
• Procedures 
– Optional parameters 
• NOCOPY makes reference 
to original parameter 
• Useful when passing 
collections 
– AUTHID is Definer unless 
specified! 
– Autonomous Transaction 
• Allows for DML no matter 
how current transaction 
ends 
– Accessible by (list) 
• Oracle12 New Feature 
• Only executable by this list 
of routines 
Create [or replace] Procedure 
[ (parameter IN OUT IN OUT …) [NOCOPY] ] 
[AUTHID {DEFINER | CURRENT_USER } ] 
[ACCESSIBLE BY (<list>)] 
{IS | AS} 
[PRAGMA AUTONOMOUS_TRANSACTION;] 
[ local variables] 
BEGIN 
<logic flow code> 
[EXCEPTION] 
<exception code processing. 
END [procedure name];
EMBARCADERO TECHNOLOGIES 
Stored Programs Syntax 
• Functions 
– Optional parameters 
– Allows for Parallel DML 
– DETERMINISTIC 
• Allows for the previous 
result to be used rather 
than rerunning the 
function when using 
the same parameters 
– Accessible by (list) 
• Oracle12 New Feature 
• Only executable by this 
list of routines 
Create [or replace] Function 
[ (parameter …) ] 
RETURN <datatype> 
[AUTHID {DEFINER | CURRENT_USER } ] 
[PARALLEL_ENABLE] 
[ACCESSIBLE BY (<list>)] 
[DETERMINISTIC] 
[RESULT_CACHE] - 11g 
{IS | AS} 
[PRAGMA AUTONOMOUS_TRANSACTION;] 
[ local variables] 
BEGIN 
<logic flow code> 
Must have a RETURN clause 
[EXCEPTION] 
<exception code processing. 
END [function name];
EMBARCADERO TECHNOLOGIES 
Stored Programs Syntax 
Functions called from SQL CANNOT: 
• Commit or rollback 
• Update the database 
• Update same table as DML SQL
EMBARCADERO TECHNOLOGIES 
Oracle 11g Query Result Cache 
• IF same function called with same in_vars 
• SQL with /*+ RESULT_CACHE */ hint 
• Function with RESULT CACHE syntax 
– RELIES_ON (table1, table2, …) – optional table DML check 
• Depreciated in Oracle11r2 
• First result cache returned instead of rerunning the function/SQL! 
• Results stored in the SGA (Result Cache Memory) 
• Any session running the function/SQL can benefit! 
– * Enterprise Edition of Oracle 
• Good for any table that is queried more than it is updated 
– Result Cache is flushed with an update
EMBARCADERO TECHNOLOGIES 
11g Query Result Cache 
• Query Result Cache Sizing and 
Monitoring 
– Sizing via Init.Ora settings: 
• RESULT_CACHE_MAX_SIZE 
– 0 disables it 
– Size in bytes in increments of 32K [num 
G | M | K ] 
– Initially defaults to 10% Shared Pool Size 
• RESULT_CACHE_MAX_RESULT 
– 0 – 100 
– Percentage of 
RESULT_CACHE_MAX_SIZE single result 
can take 
– Dynamic performance views: 
• V$RESULT_CACHE_STATISTICS 
• V$RESULT_CACHE_MEMORY 
• V$RESULT_CACHE_OBJECTS 
• V$RESULT_CACHE_DEPENDENCY
EMBARCADERO TECHNOLOGIES 
Oracle 11g Query Result Cache 
Be careful out there! 
– Make sure the SQL inside the function does not have other 
dependencies 
• Such as a SYSDATE or some other variable NOT passed in as an in 
variable 
• Can probably fix about ANY problem by putting the dependencies 
as in variables!
EMBARCADERO TECHNOLOGIES 
New PL/SQL Features 
Oracle12 allows for Granting Roles to PL/SQL Programs 
– A major problem in the past is a called program accesses a 
table…the connected user needed permissions to both the 
program and the underlying table 
– Oracle12 allows for permissions to be granted to just the 
package/procedure/function so the users cannot directly 
access the underlying tables! 
Oracle Database 12c New Features pg 246-248
EMBARCADERO TECHNOLOGIES 
Questions 
23
EMBARCADERO TECHNOLOGIES 
Thank you for attending! 
Connect with us Online 
24 
Read Dan’s Blog 
http://community.embarcadero.co 
m/index.php/article/articles-database 
Take our word for 
it & Try it out! 
http://www.embarcadero.co 
m/products/rapid-sql 
Take our survey 
The survey is posted in the 
webinar chat window 
Details can be found: sql-server-take-the-quiz-for-a-chance- 
to-win-a-quadcopter-drone

More Related Content

What's hot

Dan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New FeaturesDan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New Features
Embarcadero Technologies
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
Database and application performance vivek sharma
Database and application performance vivek sharmaDatabase and application performance vivek sharma
Database and application performance vivek sharma
aioughydchapter
 
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion MiddlewareAMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
Getting value from IoT, Integration and Data Analytics
 
Best New Features of Oracle Database 12c
Best New Features of Oracle Database 12cBest New Features of Oracle Database 12c
Best New Features of Oracle Database 12c
Pini Dibask
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Alex Zaballa
 
Oracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performansOracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performans
Emrah METE
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
Enkitec
 
Simplifying EBS 12.2 ADOP - Collaborate 2019
Simplifying EBS 12.2 ADOP - Collaborate 2019   Simplifying EBS 12.2 ADOP - Collaborate 2019
Simplifying EBS 12.2 ADOP - Collaborate 2019
Alfredo Krieg
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new features
Alfredo Krieg
 
Oracle Objects And Transactions
Oracle Objects And TransactionsOracle Objects And Transactions
Oracle Objects And Transactions
tepsum
 
Oracle Enterprise Manager 12c: The Oracle Monitoring tool of choice – Why yo...
Oracle Enterprise Manager 12c:  The Oracle Monitoring tool of choice – Why yo...Oracle Enterprise Manager 12c:  The Oracle Monitoring tool of choice – Why yo...
Oracle Enterprise Manager 12c: The Oracle Monitoring tool of choice – Why yo...
Jeff Kayser
 
Opti̇mi̇zi̇ng Data Access
Opti̇mi̇zi̇ng Data AccessOpti̇mi̇zi̇ng Data Access
Opti̇mi̇zi̇ng Data Access
Emrah METE
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Nelson Calero
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL Server
Kevin Kline
 

What's hot (19)

Dan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New FeaturesDan Hotka's Top 10 Oracle 12c New Features
Dan Hotka's Top 10 Oracle 12c New Features
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should Know
 
Database and application performance vivek sharma
Database and application performance vivek sharmaDatabase and application performance vivek sharma
Database and application performance vivek sharma
 
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion MiddlewareAMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
 
Best New Features of Oracle Database 12c
Best New Features of Oracle Database 12cBest New Features of Oracle Database 12c
Best New Features of Oracle Database 12c
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
 
Oracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performansOracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performans
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
 
Simplifying EBS 12.2 ADOP - Collaborate 2019
Simplifying EBS 12.2 ADOP - Collaborate 2019   Simplifying EBS 12.2 ADOP - Collaborate 2019
Simplifying EBS 12.2 ADOP - Collaborate 2019
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new features
 
Oracle Objects And Transactions
Oracle Objects And TransactionsOracle Objects And Transactions
Oracle Objects And Transactions
 
Oracle Enterprise Manager 12c: The Oracle Monitoring tool of choice – Why yo...
Oracle Enterprise Manager 12c:  The Oracle Monitoring tool of choice – Why yo...Oracle Enterprise Manager 12c:  The Oracle Monitoring tool of choice – Why yo...
Oracle Enterprise Manager 12c: The Oracle Monitoring tool of choice – Why yo...
 
Opti̇mi̇zi̇ng Data Access
Opti̇mi̇zi̇ng Data AccessOpti̇mi̇zi̇ng Data Access
Opti̇mi̇zi̇ng Data Access
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL Server
 

Similar to PL/SQL Tips and Techniques Webinar Presentation

Dan Hotka’s PL SQL Tips and Techniques, Part II
Dan Hotka’s PL SQL Tips and Techniques, Part IIDan Hotka’s PL SQL Tips and Techniques, Part II
Dan Hotka’s PL SQL Tips and Techniques, Part II
Embarcadero Technologies
 
OOW09 Ebs Tuning Final
OOW09 Ebs Tuning FinalOOW09 Ebs Tuning Final
OOW09 Ebs Tuning Finaljucaab
 
Exploring plsql new features best practices september 2013
Exploring plsql new features best practices   september 2013Exploring plsql new features best practices   september 2013
Exploring plsql new features best practices september 2013Andrejs Vorobjovs
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesAlfredo Abate
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1
Navneet Upneja
 
ow.ppt
ow.pptow.ppt
ow.ppt
ssuser96a63c
 
ow.ppt
ow.pptow.ppt
Presenter manual oracle dba (specially for summer interns)
Presenter manual oracle dba (specially for summer interns)Presenter manual oracle dba (specially for summer interns)
Presenter manual oracle dba (specially for summer interns)
XPERT INFOTECH
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
Ora 4 the_sqldba
Ora 4 the_sqldbaOra 4 the_sqldba
Ora 4 the_sqldba
Kellyn Pot'Vin-Gorman
 
Database Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDatabase Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance Analysis
DAGEOP LTD
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )
Rajput Rajnish
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
AiougVizagChapter
 
The Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result CacheThe Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result Cache
Steven Feuerstein
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
Alex Zaballa
 
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
Performance Tuning Corporation
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Alex Zaballa
 

Similar to PL/SQL Tips and Techniques Webinar Presentation (20)

Dan Hotka’s PL SQL Tips and Techniques, Part II
Dan Hotka’s PL SQL Tips and Techniques, Part IIDan Hotka’s PL SQL Tips and Techniques, Part II
Dan Hotka’s PL SQL Tips and Techniques, Part II
 
OOW09 Ebs Tuning Final
OOW09 Ebs Tuning FinalOOW09 Ebs Tuning Final
OOW09 Ebs Tuning Final
 
Exploring plsql new features best practices september 2013
Exploring plsql new features best practices   september 2013Exploring plsql new features best practices   september 2013
Exploring plsql new features best practices september 2013
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1
 
ow.ppt
ow.pptow.ppt
ow.ppt
 
ow.ppt
ow.pptow.ppt
ow.ppt
 
Ow
OwOw
Ow
 
Presenter manual oracle dba (specially for summer interns)
Presenter manual oracle dba (specially for summer interns)Presenter manual oracle dba (specially for summer interns)
Presenter manual oracle dba (specially for summer interns)
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Ora 4 the_sqldba
Ora 4 the_sqldbaOra 4 the_sqldba
Ora 4 the_sqldba
 
Database Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDatabase Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance Analysis
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 
Plantilla oracle
Plantilla oraclePlantilla oracle
Plantilla oracle
 
The Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result CacheThe Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result Cache
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
Migrating to Database 12c Multitenant - New Opportunities To Get It Right!
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
 

More from Embarcadero Technologies

PyTorch for Delphi - Python Data Sciences Libraries.pdf
PyTorch for Delphi - Python Data Sciences Libraries.pdfPyTorch for Delphi - Python Data Sciences Libraries.pdf
PyTorch for Delphi - Python Data Sciences Libraries.pdf
Embarcadero Technologies
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Embarcadero Technologies
 
Linux GUI Applications on Windows Subsystem for Linux
Linux GUI Applications on Windows Subsystem for LinuxLinux GUI Applications on Windows Subsystem for Linux
Linux GUI Applications on Windows Subsystem for Linux
Embarcadero Technologies
 
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Embarcadero Technologies
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Embarcadero Technologies
 
FMXLinux Introduction - Delphi's FireMonkey for Linux
FMXLinux Introduction - Delphi's FireMonkey for LinuxFMXLinux Introduction - Delphi's FireMonkey for Linux
FMXLinux Introduction - Delphi's FireMonkey for Linux
Embarcadero Technologies
 
Python for Delphi Developers - Part 2
Python for Delphi Developers - Part 2Python for Delphi Developers - Part 2
Python for Delphi Developers - Part 2
Embarcadero Technologies
 
Python for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 IntroductionPython for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 Introduction
Embarcadero Technologies
 
RAD Industrial Automation, Labs, and Instrumentation
RAD Industrial Automation, Labs, and InstrumentationRAD Industrial Automation, Labs, and Instrumentation
RAD Industrial Automation, Labs, and Instrumentation
Embarcadero Technologies
 
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBaseEmbeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
Embarcadero Technologies
 
Rad Server Industry Template - Connected Nurses Station - Setup Document
Rad Server Industry Template - Connected Nurses Station - Setup DocumentRad Server Industry Template - Connected Nurses Station - Setup Document
Rad Server Industry Template - Connected Nurses Station - Setup Document
Embarcadero Technologies
 
TMS Google Mapping Components
TMS Google Mapping ComponentsTMS Google Mapping Components
TMS Google Mapping Components
Embarcadero Technologies
 
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinarMove Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Embarcadero Technologies
 
Useful C++ Features You Should be Using
Useful C++ Features You Should be UsingUseful C++ Features You Should be Using
Useful C++ Features You Should be Using
Embarcadero Technologies
 
Getting Started Building Mobile Applications for iOS and Android
Getting Started Building Mobile Applications for iOS and AndroidGetting Started Building Mobile Applications for iOS and Android
Getting Started Building Mobile Applications for iOS and Android
Embarcadero Technologies
 
Embarcadero RAD server Launch Webinar
Embarcadero RAD server Launch WebinarEmbarcadero RAD server Launch Webinar
Embarcadero RAD server Launch Webinar
Embarcadero Technologies
 
ER/Studio 2016: Build a Business-Driven Data Architecture
ER/Studio 2016: Build a Business-Driven Data ArchitectureER/Studio 2016: Build a Business-Driven Data Architecture
ER/Studio 2016: Build a Business-Driven Data Architecture
Embarcadero Technologies
 
The Secrets of SQL Server: Database Worst Practices
The Secrets of SQL Server: Database Worst PracticesThe Secrets of SQL Server: Database Worst Practices
The Secrets of SQL Server: Database Worst Practices
Embarcadero Technologies
 
Driving Business Value Through Agile Data Assets
Driving Business Value Through Agile Data AssetsDriving Business Value Through Agile Data Assets
Driving Business Value Through Agile Data Assets
Embarcadero Technologies
 
Troubleshooting Plan Changes with Query Store in SQL Server 2016
Troubleshooting Plan Changes with Query Store in SQL Server 2016Troubleshooting Plan Changes with Query Store in SQL Server 2016
Troubleshooting Plan Changes with Query Store in SQL Server 2016
Embarcadero Technologies
 

More from Embarcadero Technologies (20)

PyTorch for Delphi - Python Data Sciences Libraries.pdf
PyTorch for Delphi - Python Data Sciences Libraries.pdfPyTorch for Delphi - Python Data Sciences Libraries.pdf
PyTorch for Delphi - Python Data Sciences Libraries.pdf
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
 
Linux GUI Applications on Windows Subsystem for Linux
Linux GUI Applications on Windows Subsystem for LinuxLinux GUI Applications on Windows Subsystem for Linux
Linux GUI Applications on Windows Subsystem for Linux
 
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
 
FMXLinux Introduction - Delphi's FireMonkey for Linux
FMXLinux Introduction - Delphi's FireMonkey for LinuxFMXLinux Introduction - Delphi's FireMonkey for Linux
FMXLinux Introduction - Delphi's FireMonkey for Linux
 
Python for Delphi Developers - Part 2
Python for Delphi Developers - Part 2Python for Delphi Developers - Part 2
Python for Delphi Developers - Part 2
 
Python for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 IntroductionPython for Delphi Developers - Part 1 Introduction
Python for Delphi Developers - Part 1 Introduction
 
RAD Industrial Automation, Labs, and Instrumentation
RAD Industrial Automation, Labs, and InstrumentationRAD Industrial Automation, Labs, and Instrumentation
RAD Industrial Automation, Labs, and Instrumentation
 
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBaseEmbeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
Embeddable Databases for Mobile Apps: Stress-Free Solutions with InterBase
 
Rad Server Industry Template - Connected Nurses Station - Setup Document
Rad Server Industry Template - Connected Nurses Station - Setup DocumentRad Server Industry Template - Connected Nurses Station - Setup Document
Rad Server Industry Template - Connected Nurses Station - Setup Document
 
TMS Google Mapping Components
TMS Google Mapping ComponentsTMS Google Mapping Components
TMS Google Mapping Components
 
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinarMove Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinar
 
Useful C++ Features You Should be Using
Useful C++ Features You Should be UsingUseful C++ Features You Should be Using
Useful C++ Features You Should be Using
 
Getting Started Building Mobile Applications for iOS and Android
Getting Started Building Mobile Applications for iOS and AndroidGetting Started Building Mobile Applications for iOS and Android
Getting Started Building Mobile Applications for iOS and Android
 
Embarcadero RAD server Launch Webinar
Embarcadero RAD server Launch WebinarEmbarcadero RAD server Launch Webinar
Embarcadero RAD server Launch Webinar
 
ER/Studio 2016: Build a Business-Driven Data Architecture
ER/Studio 2016: Build a Business-Driven Data ArchitectureER/Studio 2016: Build a Business-Driven Data Architecture
ER/Studio 2016: Build a Business-Driven Data Architecture
 
The Secrets of SQL Server: Database Worst Practices
The Secrets of SQL Server: Database Worst PracticesThe Secrets of SQL Server: Database Worst Practices
The Secrets of SQL Server: Database Worst Practices
 
Driving Business Value Through Agile Data Assets
Driving Business Value Through Agile Data AssetsDriving Business Value Through Agile Data Assets
Driving Business Value Through Agile Data Assets
 
Troubleshooting Plan Changes with Query Store in SQL Server 2016
Troubleshooting Plan Changes with Query Store in SQL Server 2016Troubleshooting Plan Changes with Query Store in SQL Server 2016
Troubleshooting Plan Changes with Query Store in SQL Server 2016
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 

Recently uploaded (20)

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 

PL/SQL Tips and Techniques Webinar Presentation

  • 1. EEMMBBAARRCCAADDEERROO TTEECCHHNNOOLLOOGGIIEESS PL/SQL Tips & Techniques Scott Walz | Embarcadero Director of Software Consultants Dan Hotka |Author & Instructor |Oracle Ace Director
  • 2. EMBARCADERO TECHNOLOGIES PL/SQL Tips and Techniques • Rapid SQL – PL/SQL Templates • Read my blogs – PL/SQL Debugging • Prior Webinar – PL/SQL Profiling • Read my blogs • PL/SQL Tips – Oracle Overview – Compiler Options • Includes some useful performance Tips for Functions
  • 3. EMBARCADERO TECHNOLOGIES Oracle Architecture Default Result Cache (11g) Oracle SGA Keep (optional) PGA Dedicated User Processes Listener Shared Pool TNSNAMES.ORA LISTENER.ORA Tablespaces Database Files Database Files Database Files Buffer Pool nK (Optional) Recycle (Optional) Library Cache Dictionary Cache Shared SQL SQL Source Exe Plan Call Stack UGA Sess Data Cursor Area Sort Area Client Result Cache (11g) PL/SQL Engine SQL Engine SQL Statement External Files UTL File External Tables OCI/JDBC URL
  • 5. EMBARCADERO TECHNOLOGIES PL/SQL Overview • Procedure – Does processing – Returns a code that the work was successful or not – May or may not be passed values – May or may not return values • Functions – Similar to Procedure EXCEPT it does return a value!
  • 6. EMBARCADERO TECHNOLOGIES PL/SQL Overview • Packages – Grouping related procedures and functions – Can share cursors/work areas – Code inheritance – When one module is accessed…entire package is loaded into Oracle • Database Triggers – Assigned to tables – Executes before or after a DML to the table
  • 7. EMBARCADERO TECHNOLOGIES Rapid SQL Templates • IF-THEN-ELSE – Can nest 250+ Deep – ELSE is optional – ELSIF is indeed misspelled! Ctrl+ Space bar
  • 8. EMBARCADERO TECHNOLOGIES Rapid SQL Templates IF_ENDIF IF_ELSIF
  • 10. EMBARCADERO TECHNOLOGIES Rapid SQL Templates • Case – Alternative to IF-THEN-ELSE – Can nest 250+ Deep – ELSE is optional Case + Ctrl+ Space bar
  • 11. EMBARCADERO TECHNOLOGIES Rapid SQL Templates CASE
  • 13. EMBARCADERO TECHNOLOGIES PL/SQL Profiling • Profiler – How long each routine took to execute – How long each line of code took to execute – RapidSQL has a nice interface • Easy to use • Highlights performance issues – Dan will demonstrate how it works…
  • 15. EMBARCADERO TECHNOLOGIES PL/SQL Debugging • Debugger: – Oracle symbolic debugger – Changing variable content on the fly – Setting code breakpoints – Stepping through code dependencies Demo
  • 16. EMBARCADERO TECHNOLOGIES Stored Programs Syntax • Procedures – Optional parameters • NOCOPY makes reference to original parameter • Useful when passing collections – AUTHID is Definer unless specified! – Autonomous Transaction • Allows for DML no matter how current transaction ends – Accessible by (list) • Oracle12 New Feature • Only executable by this list of routines Create [or replace] Procedure [ (parameter IN OUT IN OUT …) [NOCOPY] ] [AUTHID {DEFINER | CURRENT_USER } ] [ACCESSIBLE BY (<list>)] {IS | AS} [PRAGMA AUTONOMOUS_TRANSACTION;] [ local variables] BEGIN <logic flow code> [EXCEPTION] <exception code processing. END [procedure name];
  • 17. EMBARCADERO TECHNOLOGIES Stored Programs Syntax • Functions – Optional parameters – Allows for Parallel DML – DETERMINISTIC • Allows for the previous result to be used rather than rerunning the function when using the same parameters – Accessible by (list) • Oracle12 New Feature • Only executable by this list of routines Create [or replace] Function [ (parameter …) ] RETURN <datatype> [AUTHID {DEFINER | CURRENT_USER } ] [PARALLEL_ENABLE] [ACCESSIBLE BY (<list>)] [DETERMINISTIC] [RESULT_CACHE] - 11g {IS | AS} [PRAGMA AUTONOMOUS_TRANSACTION;] [ local variables] BEGIN <logic flow code> Must have a RETURN clause [EXCEPTION] <exception code processing. END [function name];
  • 18. EMBARCADERO TECHNOLOGIES Stored Programs Syntax Functions called from SQL CANNOT: • Commit or rollback • Update the database • Update same table as DML SQL
  • 19. EMBARCADERO TECHNOLOGIES Oracle 11g Query Result Cache • IF same function called with same in_vars • SQL with /*+ RESULT_CACHE */ hint • Function with RESULT CACHE syntax – RELIES_ON (table1, table2, …) – optional table DML check • Depreciated in Oracle11r2 • First result cache returned instead of rerunning the function/SQL! • Results stored in the SGA (Result Cache Memory) • Any session running the function/SQL can benefit! – * Enterprise Edition of Oracle • Good for any table that is queried more than it is updated – Result Cache is flushed with an update
  • 20. EMBARCADERO TECHNOLOGIES 11g Query Result Cache • Query Result Cache Sizing and Monitoring – Sizing via Init.Ora settings: • RESULT_CACHE_MAX_SIZE – 0 disables it – Size in bytes in increments of 32K [num G | M | K ] – Initially defaults to 10% Shared Pool Size • RESULT_CACHE_MAX_RESULT – 0 – 100 – Percentage of RESULT_CACHE_MAX_SIZE single result can take – Dynamic performance views: • V$RESULT_CACHE_STATISTICS • V$RESULT_CACHE_MEMORY • V$RESULT_CACHE_OBJECTS • V$RESULT_CACHE_DEPENDENCY
  • 21. EMBARCADERO TECHNOLOGIES Oracle 11g Query Result Cache Be careful out there! – Make sure the SQL inside the function does not have other dependencies • Such as a SYSDATE or some other variable NOT passed in as an in variable • Can probably fix about ANY problem by putting the dependencies as in variables!
  • 22. EMBARCADERO TECHNOLOGIES New PL/SQL Features Oracle12 allows for Granting Roles to PL/SQL Programs – A major problem in the past is a called program accesses a table…the connected user needed permissions to both the program and the underlying table – Oracle12 allows for permissions to be granted to just the package/procedure/function so the users cannot directly access the underlying tables! Oracle Database 12c New Features pg 246-248
  • 24. EMBARCADERO TECHNOLOGIES Thank you for attending! Connect with us Online 24 Read Dan’s Blog http://community.embarcadero.co m/index.php/article/articles-database Take our word for it & Try it out! http://www.embarcadero.co m/products/rapid-sql Take our survey The survey is posted in the webinar chat window Details can be found: sql-server-take-the-quiz-for-a-chance- to-win-a-quadcopter-drone