Partitioning of reference - application always accesses all partitions

I followed the instructions to Oracle Database 11g: new features for developers and DBAS Top | Partitioning on reference partitioning and actually tried this example. If you do not want to read the details of the example here is the SQL code of two tables:

create table customers

(

cust_id key primary number.

cust_name varchar2 (200),

side varchar2 (1) not null

)

list partition (side)

(

values of pA score ("A"),

pB of partition values ('B')

);

create table sales

(

sales_id number primary key,

cust_id number not null,

sales_amt number,

constraint fk_sales_01

foreign key (cust_id)

customer references

)

benchmark score (fk_sales_01);

I've added a few values:

Insert into Z_CUSTOMERS (CUST_ID, CUST_NAME, RATING) Values (1, 'John', 'A');

Insert into Z_CUSTOMERS (CUST_ID, CUST_NAME, RATING) Values (2, 'Ben', 'B');

Insert into Z_SALES (SALES_ID, CUST_ID, SALES_AMT) Values (10, 1, 200);

Insert into Z_SALES (SALES_ID, CUST_ID, SALES_AMT) Values (20, 2, 500);

Insert into Z_SALES (SALES_ID, CUST_ID, SALES_AMT) Values (30, 2, 900);

Insert into Z_SALES (SALES_ID, CUST_ID, SALES_AMT) Values (40, 2, 250);

COMMIT;

Now, my understanding of the reference partitioning power comes from the fact that I run a query such as:

Select * from z_sales where cust_id in (select cust_id in z_customers where the rating = 'A');

It must cover a single partition in z_sales and z_customers. However, the execution plan indicates the following:

Plan

SELECT STATEMENT ALL_ROWSCost: 6 bytes: 108 cardinality: 2

6 NESTED LOOPS

Cost 4 NESTED LOOPS: cardinality of 6 bytes: 108: 2

2 PARTITION REFERENCES all THE cost: 4 bytes: 156 cardinality: 4 Partition #: 3 Partitions accessed #1-#2

1 TABLE ACCESS FULL TABLE ARIBA_STAR2. Z_SALES cost: 4 bytes: 156 cardinality: 4 Partition #: 3 Partitions accessed #1-#2

3 INDEX UNIQUE INDEX (SINGLE) ARIBA_STAR2 SCAN. SYS_C003391336 cost: cardinality 0: 1

TABLE 5 ACCESS BY INDEX ROWID TABLE ARIBA_STAR2 OVERALL. Z_CUSTOMERS cost: 1 bytes: cardinality 15: 1 Partition #: 6 Partitions accessed #1

Two partitions in z_sales are presented.

In fact, I tried this on the application I support (with tables of course) and it seems to have the same problem: all partitions are accessible.

Any ideas on what I'm doing wrong here?

Thank you!

You are not the full story. There is an overall index, according to the execution you plan posted. In any case, works OK for me:

SQL > select * from v version $;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
AMT for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

SQL > explain the plan for
2 Select * from sales where cust_id in (select cust_id from customers where the rating = 'A')
3.

He explained.

SQL > select * from table (dbms_xplan.display);

PLAN_TABLE_OUTPUT
---------------------------------------------------------------------------------------------------------
Hash value of plan: 864604532

---------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |
---------------------------------------------------------------------------------------------------
|  0 | SELECT STATEMENT |           |    2.   108.    5 (0) | 00:00:01 |       |       |
|  1.  SIMPLE LIST OF PARTITION.           |    2.   108.    5 (0) | 00:00:01 |     1.     1.
|  2.  NESTED LOOPS |           |    2.   108.    5 (0) | 00:00:01 |       |       |
|  3.    TABLE ACCESS FULL | CUSTOMERS |    1.    15.    3 (0) | 00:00:01 |     1.     1.
|*  4 |    TABLE ACCESS FULL | SALES |    2.    78.    2 (0) | 00:00:01 |     1.     1.
---------------------------------------------------------------------------------------------------

PLAN_TABLE_OUTPUT
---------------------------------------------------------------------------------------------------------

Information of predicates (identified by the operation identity card):
---------------------------------------------------

4 - filter ("CUST_ID" ="CUST_ID")

Note
-----
-dynamic sample used for this survey (level = 2)

20 selected lines.

SQL >

SY.

Tags: Database

Similar Questions

  • With the new Apple TV, I'm stuck on a black loading screen in the application to access all CBS. How can I solve this problem?

    I have the new Apple TV, and after seeing a show in the application to access all CBS I'm stuck on a black loading screen. This happened almost 10 minutes now and I don't know what to do to be able to find the main screens of the application and to be able to continue to watch the shows within the app.

    Press twice on the logo TV button then slide upward on the touchpad.

    The CBS app is stuck and hitting the button twice allows you to force the application to quit.

  • Initially, I downloaded the application and was able to access all my photos by album, photostream, fb, etc.. Now, it will not go all. After you remove the application and try to download it, it says that I have to pay for it (yet) any help would be

    Initially, I downloaded the application and was able to access all my photos by album, photostream, fb, etc.. Now, it will not go all. After you remove the application and try to download it, it says that I have to pay for it (yet) any help would be appreciated.

    Sounds like a question of verification on any market that you have bought PS Touch. Have you tried contacting Google and Apple to see what they say?

  • How can I access all of my local readers of Virtual Machine

    Hello... IAM a newbie here and just installed VMware Server 2.0.1 on my windows xp (laptop). Guest operating system is Windows Server 2003. I have 3 partitions in my host. That is, C, D, E drives.

    I installed VMware server on C:\.  What is the problem how can access all my local drives on the host of the virtual machine operating system.   (I can only access the Virtual Machine's hard drive).

    Could you please help me in this issue...

    Thank you and best regards,

    Indianmale...

    use of the network / sharing on your file systems

    Please reward points - we must know if we helped.

  • Access all my apps ipad on apple TV

    How to access all the applications that I have on my ipad to display via apple TV?

    Get help with AirPlay and AirPlay Mirroring on your iPhone, iPad or iPod touch - Apple Support

    While application developers can choose to block mirror air game if the proponent chooses

  • IPhoto locked since November external disk library can access all my photos?

    IPhoto locked since November external disk library can access all my photos? It must have been during the upgrade of the OS when forced to use the Photos Application (instead of iPhotos) now on OS X El Capitan 10.11.3. The iPhoto library is 280.4 GB and when I click on get info it says 'you have personalized access' under sharing and permissions. I tried to use iPhoto and photo to open. I'm stuck. Someone please save me. All my family photos with children. My wife will kill Me!

    You were not forced, like many other people you might have chosen to continue to use iphoto if you wanted to. Who said that you you couldn't.

    Now, how is the drive 'locked '.

  • whenever I connect as administrater I can't access all the apps.

    has added another user account and represent now administrater won't let me open anything ncagle1

    Hi ncagle1,

    ·        What happens when you access applications?

    ·        You receive an error message?

    ·        Is the new administrator account user account?

    Check the link for the reference below: Troubleshoot "access denied" when opening files or folders:http://windows.microsoft.com/en-US/windows-vista/Troubleshoot-access-denied-when-opening-files-or-folders

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • WSA block of mobile applications to access internet

    Dear all

    I s680 to control internet access. I put my ASA of the WSA transmit all ip traffic ( WCCP , Service identifier: 90 ), all computers can access the internet perfectly, but on mobile, some applications cannot access (facebook and youtube for example)

    all boards

    Best regards

    You're doing HTTPS, and mobile clients trust the cert you are using?

  • My account says I paid for Adobe Acrobat [not Reader] DC, but I can't access all the features.

    My account says I paid for Adobe Reader DC, but I can't access all the features.

    [Title edited... MOD]

    did you buy or sign up for a subscription?

    If you subscribe, install the cc desktop application, if it is not already installed.

    then check that your current account (and only the adobe, used in the next step id is good) by logging in here and check the status of your subscription, https://www.adobe.com/account.html

    then, if it's current, disconnect and then back to your client application using the adobe with the link above in cc id: http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

  • How to access all the lines one by one, a table ADF via managed bean

    Hi Experts,

    Hi I'm new in the ADF.

    Could someone help me to fix the case below?

    Scenario - I have a table called Test_T1 that have 4 columns C1, C2, C3, C4. Creation of EO, VO and AM for test_t1.
    When created in pages ADF, I selected the option "automatically exposed components UI in new managed bean" (mynewmanagedbean.java).
    Control data drag and drop Test_T1 table in the page as a table of the ADF.
    Set the properties is read-only C1, C2, C3 and C4 is an input text.
    Add after the table and attathed button action on the mynewmanagedbean.java bean managed.
    At the time of the Test_T1 page filled with a few No.. lines (such as 9).
    How can I access all the lines above through the key without selection of these.
    In fact, I want to print all the rows of the table in the log at the time to press the button.

    Thanks in advance.

    Sorry for the delay, the code was copied from another test case. You can work directly with the line...
    I created a new test case based on the departments of the HR schema table:

    import oracle.adf.model.BindingContext;
    import oracle.adf.model.bean.DCDataRow;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.share.logging.ADFLogger;
    
    import oracle.jbo.Row;
    
    public class DumpRows
    {
        private static ADFLogger _logger = ADFLogger.createADFLogger(DumpRows.class);
        public DumpRows()
        {
        }
    
        public String cb3_action()
        {
            DCBindingContainer bindings =
            (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            DCIteratorBinding dcIteratorBindings =
            bindings.findIteratorBinding("DepartmentsView1Iterator");
    
            // Get all the rows of a iterator
            Row[] rows = dcIteratorBindings.getAllRowsInRange();
            for (Row row : rows) {
                String depname = (String)row.getAttribute("DepartmentName");
                _logger.info(depname);
            }
            return null;
        }
    }
    

    As you do not have the class of line interface build you must get the attributes in their names. Be careful here, because any misspelling is cought only when you run the application.

    Timo

  • manage all folios and access all the Analytics

    Hello and happy new year

    We have an urgent question about dps:

    We create an adobe id different for each application we build.

    by downloading folios associated with a certain app to the folio Builder we need to connect with this specific adobe ID?

    or can we use 1 adobe ID to manage all folios for all applications.

    which is the best way to go, in the long term to manage all folios and access all the Analytics.

    Please let us know as soon as possible.

    Ediz

    one account per app. Yes, you have to identify you with this Adobe ID to create content for this App. unless you intend to create application kiosk (one that shows all folios of all content), this is the right approach.

  • Can I save the Organizer, move my photos and always access to post-secondary studies?

    I backed up my catalog to an external hard drive last night and there were about 20 disconnected files.  I wasn't able to locate so I allowed the back upward to continue without them.  Do you know what are the consequences for that?

    In addition, many of my pictures are on my C drive, and several are on the external hard drive.  My catalogue included photos of these two places. When I move the rest of my photos from the C drive of my computer to the external hard drive, the catalogue will always be able to access or will I have to backup everything again?

    My goal is to free up space on my computer, so PSE will stop freezing.  I am interested in fact at this moment can enter all my photos in the organizer and labeled.  I'll change them later I have started creating digital scrapbook pages.

    Can someone tell me if how I go about this is correct?

    Thank you

    Thanks Ken.  I have supported all my external hard drive, but now I think I rather just move everything there and reminds me of my photos of the HD post to free up space on my C drive.  Is this possible?

    Date: Wednesday, February 22, 2012 15:55:14-0700

    From: [email protected]

    To: [email protected]

    Topic: Can I save the Organizer, move my photos and always access to post-secondary studies?

    Re: Can I save the Organizer, move my photos and always access to post-secondary studies?

    created by photodrawken in Photoshop Elements - discover complete discussion

    PSE allows you to back up your catalog, actual photos as well as the catalog (database) is saved. When you restore from a backup, you can specify where inbound pictures will be placed. Ken

    Replies to this message received to everyone subscribed to this topic, not directly to the person who posted the message. To post a reply, or reply to this email or visit the message page: http://forums.adobe.com/message/4223403#4223403

    To unsubscribe from this thread, please visit the page message to http://forums.adobe.com/message/4223403#4223403. In the Actions box to the right, click on stop Notifications by e-mail.

    Start a new discussion in Photoshop Elements, by e-mail, or to the Adobe Forums

    For more information on maintaining your email forum notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Why can't access all the options on the options screen

    Using Firefox 40.0.2 and find that when I try to access the options screen, it shows, but I can't access all the options it contains, including passwords. This has only just begun, so this would indicate a problem with this version. How can I or yoy, solve this problem.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • Firefox is unable to access all the pages of an HTTPS site.

    We have a computer cannot access all the pages on a specific HTTPS site. I don't want to advertise the URL here. "" We can connect to the site and navagate to half pages, but the other half give ' (error code: sec_error_unknown_issuer). We have uninstalled FF and spilled the appdata. Renamed the cert db and he had to recreate. IE working on it from that computer to the website. All computers in the office can access the web site without any problems, some using ESR some with regular FF. This system uses the latest version of FF ESR, but we also tried the regular version. The only thing we haven't tried is disable the AV (Symantic). One thing I noticed, is that the URL of this web site are extremely long.

    Why the FF honors cert for some pages but not others. It also does us not add an exception.

    Thank you

     Mesept
    

    The first thing I checked was the cert chain, all certificates are valid. Time on computers is very good, the second thing I checked.

    As I said in a previous post, a few pages work, some do not which means that certificates are valid for certain pages, may not be a problem of cert, sometimes they work. Same site also works with IE and chrome on the same systems.

    Cannot ignore and accept the cert in he won't let me. Which is off and I don't know how to turn it on.

    In any case, I submitted a ticket for the owners of the website last week and now everything works.

    Thanks for the answers that I don't have a resolution, I guess that developers found a bug and fixed it.

  • My PC crashed. Restored on a new record and a new installation of FireFox. I can still access all the files. How do I take the old bookmarks if there is no backup?

    My PC crashed. Restored on a new record and a new installation of FireFox. I can still access all the files on the old drive. How do I take the old bookmarks if no backup exists, or has been completed? Does not save bookmarks of FireFox auto? If, then what is the file name and where is normally stored by FireFox?

    In fact, it can be easier...

    If you have the old drive connected as, say, drive E, go to:

    E:\Users\username
    

    Then click in the address bar and paste it after this and press ENTER to open it:

    \AppData\Roaming\Mozilla\Firefox\Profiles
    

    Normally, you have only one file, which has a random string followed by "default." In this case, click on this file and find the subfolder bookmarkbackups.

    If you find multiple profile folders, look inside to find the most recently updated backups.

    To restore the backup files, see: restore bookmarks from a backup or move them to another computer

Maybe you are looking for