SlideShare a Scribd company logo
1 of 7
McDOUG Question #1
A key Oracle11g enhancement for
PL/SQL is the function result cache.
Which of the following types of data
can be used in the parameter list or
return clause (but not necessarily
both) of a function defined using the
RESULT_CACHE keyword?
Your Choices?
1.   Cursor variables
2.   Nested tables and varrays
3.   Associative arrays
4.   Object types
5.   Large objects (BLOB, CLOB, BFILE)
6.   Records (user-defined and %ROWTYPE)
7.   Scalars (numbers, dates, strings, Booleans)
Answer
You cannot use any of the following datatypes in either the
  parameter list and RETURN clause of a function that
  includes the RESULT_CACHE clause:

 Large objects (BLOB, CLOB, BFILE)
 Object types
 Cursor variables

 If you try to use these anywhere in the function header, you
  will get this compile error: PLS-00999: implementation
  restriction (may be temporary) RESULT_CACHE is
  disallowed on subprograms with IN parameter of (or
Continue
 You can, on the other hand, return the
  following types of data (but they may not
  appear in the parameter list of the function):

   Associative arrays
   Nested tables
   Varrays
   Records (user-defined and %ROWTYPE)
Restrictions on Result-Cached Functions



 To be result-cached, a function must meet
  all of the following criteria:
 It is not defined in a module that has
  invoker's rights or in an anonymous block.
 It is not a pipelined table function.
 It has no OUT or IN OUT parameters.
Restrictions on Result-Cached Functions
   No IN parameter has one of the following types:
     – BLOB
     – CLOB
     – NCLOB
     – REF CURSOR
     – Collection
     – Object
     – Record
   The return type is none of the following:
     – BLOB
     – CLOB
     – NCLOB
     – REF CURSOR
     – Object
     – Record or PL/SQL collection that contains one of the preceding
        unsupported return types
Q&A
 Use RESULT CACHE Wisely?
 Thank You.

More Related Content

Similar to PL/SQL11g Question #1

3963066 pl-sql-notes-only
3963066 pl-sql-notes-only3963066 pl-sql-notes-only
3963066 pl-sql-notes-only
Ashwin Kumar
 
Analytic & Windowing functions in oracle
Analytic & Windowing functions in oracleAnalytic & Windowing functions in oracle
Analytic & Windowing functions in oracle
Logan Palanisamy
 
Functions oracle (pl/sql)
Functions oracle (pl/sql)Functions oracle (pl/sql)
Functions oracle (pl/sql)
harman kaur
 
Unit 4 rdbms study_material
Unit 4  rdbms study_materialUnit 4  rdbms study_material
Unit 4 rdbms study_material
gayaramesh
 

Similar to PL/SQL11g Question #1 (20)

Oracle 11g developer on linux training in bangalore
Oracle 11g developer on linux training in bangaloreOracle 11g developer on linux training in bangalore
Oracle 11g developer on linux training in bangalore
 
Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1
 
3963066 pl-sql-notes-only
3963066 pl-sql-notes-only3963066 pl-sql-notes-only
3963066 pl-sql-notes-only
 
Introduction to JavaScript for APEX Developers - Module 1: JavaScript Basics
Introduction to JavaScript for APEX Developers - Module 1: JavaScript BasicsIntroduction to JavaScript for APEX Developers - Module 1: JavaScript Basics
Introduction to JavaScript for APEX Developers - Module 1: JavaScript Basics
 
09 Managing Dependencies
09 Managing Dependencies09 Managing Dependencies
09 Managing Dependencies
 
Oracle SQL Part 2
Oracle SQL Part 2Oracle SQL Part 2
Oracle SQL Part 2
 
Analytic & Windowing functions in oracle
Analytic & Windowing functions in oracleAnalytic & Windowing functions in oracle
Analytic & Windowing functions in oracle
 
Functions oracle (pl/sql)
Functions oracle (pl/sql)Functions oracle (pl/sql)
Functions oracle (pl/sql)
 
What;s Coming In SPARQL2?
What;s Coming In SPARQL2?What;s Coming In SPARQL2?
What;s Coming In SPARQL2?
 
ZekeLabs PLSQL slides
ZekeLabs PLSQL slidesZekeLabs PLSQL slides
ZekeLabs PLSQL slides
 
Oracle Objects And Transactions
Oracle Objects And TransactionsOracle Objects And Transactions
Oracle Objects And Transactions
 
SPARQL 1.1 Status
SPARQL 1.1 StatusSPARQL 1.1 Status
SPARQL 1.1 Status
 
PL/SQL CURSORES
PL/SQL CURSORESPL/SQL CURSORES
PL/SQL CURSORES
 
Oracle 11G Development Training noida Delhi NCR
Oracle 11G Development Training noida Delhi NCROracle 11G Development Training noida Delhi NCR
Oracle 11G Development Training noida Delhi NCR
 
Plsql
PlsqlPlsql
Plsql
 
Store programs
Store programsStore programs
Store programs
 
Payilagam oracle sql & plsql training syllabus
Payilagam oracle sql & plsql training syllabusPayilagam oracle sql & plsql training syllabus
Payilagam oracle sql & plsql training syllabus
 
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
 
Unit 4 rdbms study_material
Unit 4  rdbms study_materialUnit 4  rdbms study_material
Unit 4 rdbms study_material
 
Oracle plsql and d2 k interview questions
Oracle plsql and d2 k interview questionsOracle plsql and d2 k interview questions
Oracle plsql and d2 k interview questions
 

More from Kai Liu

CHX PYTHON INTRO
CHX PYTHON INTROCHX PYTHON INTRO
CHX PYTHON INTRO
Kai Liu
 
What is Listagg?
What is Listagg?What is Listagg?
What is Listagg?
Kai Liu
 

More from Kai Liu (20)

QQ and Advance query
QQ and Advance queryQQ and Advance query
QQ and Advance query
 
CHX PYTHON INTRO
CHX PYTHON INTROCHX PYTHON INTRO
CHX PYTHON INTRO
 
What is Listagg?
What is Listagg?What is Listagg?
What is Listagg?
 
Schedulers
SchedulersSchedulers
Schedulers
 
Sql Question #5
Sql Question #5Sql Question #5
Sql Question #5
 
Oracle10g External Tables
Oracle10g External TablesOracle10g External Tables
Oracle10g External Tables
 
Sql Question #3
Sql Question #3Sql Question #3
Sql Question #3
 
SQL Tuning Overview
SQL Tuning OverviewSQL Tuning Overview
SQL Tuning Overview
 
Dms 2.0 Direction
Dms 2.0 DirectionDms 2.0 Direction
Dms 2.0 Direction
 
Dms 2.0 Plan Proposal
Dms 2.0 Plan ProposalDms 2.0 Plan Proposal
Dms 2.0 Plan Proposal
 
Toad
ToadToad
Toad
 
Dms Emailing Reports
Dms Emailing ReportsDms Emailing Reports
Dms Emailing Reports
 
QQ And Advance Query
QQ And Advance QueryQQ And Advance Query
QQ And Advance Query
 
Troubleshooting Batch Reports
Troubleshooting Batch ReportsTroubleshooting Batch Reports
Troubleshooting Batch Reports
 
Dms Reporting Criteria
Dms Reporting CriteriaDms Reporting Criteria
Dms Reporting Criteria
 
Dms Batch Reporting
Dms Batch ReportingDms Batch Reporting
Dms Batch Reporting
 
Dms Reporting Overview
Dms Reporting OverviewDms Reporting Overview
Dms Reporting Overview
 
Dms 2 Direction
Dms 2 DirectionDms 2 Direction
Dms 2 Direction
 
Dms Project
Dms ProjectDms Project
Dms Project
 
Dms Acknowledgements
Dms AcknowledgementsDms Acknowledgements
Dms Acknowledgements
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

PL/SQL11g Question #1

  • 1. McDOUG Question #1 A key Oracle11g enhancement for PL/SQL is the function result cache. Which of the following types of data can be used in the parameter list or return clause (but not necessarily both) of a function defined using the RESULT_CACHE keyword?
  • 2. Your Choices? 1. Cursor variables 2. Nested tables and varrays 3. Associative arrays 4. Object types 5. Large objects (BLOB, CLOB, BFILE) 6. Records (user-defined and %ROWTYPE) 7. Scalars (numbers, dates, strings, Booleans)
  • 3. Answer You cannot use any of the following datatypes in either the parameter list and RETURN clause of a function that includes the RESULT_CACHE clause:  Large objects (BLOB, CLOB, BFILE)  Object types  Cursor variables  If you try to use these anywhere in the function header, you will get this compile error: PLS-00999: implementation restriction (may be temporary) RESULT_CACHE is disallowed on subprograms with IN parameter of (or
  • 4. Continue  You can, on the other hand, return the following types of data (but they may not appear in the parameter list of the function):  Associative arrays  Nested tables  Varrays  Records (user-defined and %ROWTYPE)
  • 5. Restrictions on Result-Cached Functions  To be result-cached, a function must meet all of the following criteria:  It is not defined in a module that has invoker's rights or in an anonymous block.  It is not a pipelined table function.  It has no OUT or IN OUT parameters.
  • 6. Restrictions on Result-Cached Functions  No IN parameter has one of the following types: – BLOB – CLOB – NCLOB – REF CURSOR – Collection – Object – Record  The return type is none of the following: – BLOB – CLOB – NCLOB – REF CURSOR – Object – Record or PL/SQL collection that contains one of the preceding unsupported return types
  • 7. Q&A  Use RESULT CACHE Wisely?  Thank You.