Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3430672
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:13:58+00:00 2026-05-18T07:13:58+00:00

I have a view V2 that selects from another view V1 and adds a

  • 0

I have a view V2 that selects from another view V1 and adds a couple predicate filters.

V2 IS SELECT * FROM V1 
WHERE ACTIVE='Y' 
AND TYPE = '1';

When I do a join between V2 and a table FOO on the column USER_ID (indexed in FOO) I find that it first calculates the entire results for V2 before joining with FOO on the indexed column (indexed also in the source table of V1).

SELECT * FROM FOO 
INNER JOIN V2
  ON FOO.USER_ID = V2.USER_ID
WHERE FOO.SCHOOL = '3'

But when I do a join between V1 and FOO it finds the record in FOO first and then uses the index to quickly retrieve the row from V1 using predicate pushing & indexes.

I have narrowed down the difference to the fact that V2 is built on top of V1 with predicates. I changed V2 to be an exact copy of V1 but put the two additional predicate filters in it directly and found that it behaved the same way when joined with FOO that V1 did but with the proper restrictions in place now.

Are nested views unable to push predicates all the way down to the tables? Also, how consistent is predicate pushing? I have several views where if predicates are not pushed it would ruin performance. They work fine now but what guarantee is there they will continue to do so?

I’d like to nest/inherit views rather than duplicating the exact same queries with minor differences to keep things DRY.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:13:59+00:00Added an answer on May 18, 2026 at 7:13 am

    What version of Oracle are you using?
    What is the parameter OPTIMIZER_SECURE_VIEW_MERGING set to? You may try setting that to FALSE or granting the user the MERGE ANY VIEW privilege.

    If that doesn’t help, can you post the two query plans?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a table view that when the user taps on one of the
I've started developing a site that pulls two images randomly from a database. I
I have the following code: ViewData.Model = from m in dataModel.Items where m.Loaned ==
I am working on a routing system for a transportation type similar to a
I have a schema extraction tool for SQL & Oracle which then tries to
I have seen a few variants of this nested UL array question on stackoverflow,
Hi on my masterpage I have a search box contained in it is a
I want to create a schema for a ACL; however, I'm torn between a
I have a simple Coredata model with one entity called conversation and the other
So right now when my app starts I get all of my data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.