Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pipelined Stored Procedure optimization

brilliantMay 8 2019 — edited May 10 2019

This has probably been beaten to death but my search yields many answers.

Wondering if someone can point me to a decent resource on accomplishing the below goals

1. Returning a large table from complex query (5k-2.5M) records from 11M records resultset of the complex query

2. Applying Row Level Security (preferably from stored procedure) for best performance and best security to a highly sensitive set of data

Questions,

1. Do I need a Table Type, Row Type, and Function or Package to return this efficiently?

2. I have resources online saying BULKCOLLECT (performance issue in shared environment), REF CURSOR, SYS REF CURSOR. Which way to go?

3. Should I run in PARALLEL hint or any others?

Any links or syntax help is appreciated

Thanks,

Comments

The problem is in processing of check constraints - it seems there is a check constraint without condition. Can you run query for check constraints and to see in what column is the condition and if there is a check constraint without condition

Philip

NISHANTH BEJGAM

Thank you so much Philip. I followed your instruction and by executing the following queries, I see no results returned. and validated the CHECK constraints with conditions as well. Besides, I see couple of constraints are in disabled state in scheme now, please confirm will that cause the issue.
select constraint_name,search_condition from user_constraints where constraint_type='C' and search_condition is NULL;
select constraint_name,search_condition from all_constraints where constraint_type='C' and search_condition is NULL
select constraint_name,search_condition from dba_constraints where constraint_type='C' and search_condition is NULL.

there is one more column SEARCH_CONDITION_VC - can you check it as well?

NISHANTH BEJGAM

all the constraints are having NULL value for SEARCH_CONDITION_VC however SEARCH_CONDITION does has the value in it.

what's the DB version, PDB or CDB?

NISHANTH BEJGAM

it is 12C, PDB

Philip Stoyanov-Oracle

I cannot reproduce in my environment. How those tables and check constraints are created. Do you connect as owner of those tables or you see them through grants and synonyms. Are they in another container/PDB?

1 - 7

Post Details

Added on May 8 2019
24 comments
729 views