How to reduce clone/merge overhead in high cardinality 1:M relationships?

Our application has numerous parent/child type 1:M relationships, where the collection size can be very large, and often the child object is itself very large. For these relationships, we have a catch-22 when using Toplink. Using the 1:M relationship with lazy loading and batch-reading is ideal for code that may or may not need the child objects. TopLink caching saves much SQL overhead when traversing the relationship in a read-only context. However, when making updates, the relationship becomes a burden, due to the overhead of cloning and merging the entire collection of objects. When we simply need to add a new object to the collection, TopLink automatically instantiates the collection, and makes clones and backup copies of all the contained objects. The database query is not needed, because the collection is stored in the cached parent object, but the copying overhead really hurts performance.
What we need is a way to add or remove child objects in a UOW without this overhead, but still maintain the collection in the cached parent. I have been trying various things without any success. Is there documented pattern for this problem? Do I need to resort to using the AttributeChangeTrackingPolicy and/or a custom CopyPolicy, or is there a way I can avoid the cloning entirely?
Thanks in advance.
- Bruno

Of the options you've suggested, I suspect the simplest and most performant option would be to use a postMerge handler to maintain the parent collection. This would work in a replicated cache as well, correct? How do I avoid introducing race conditions? Would I need to lock the parent object using the IdentityMapManager while I add or remove from the collection?
As an aside, I must say that the documentation is really lacking for information about what is implied by a "bi-directional" mapping. What I have found through experimentation is that when the "relationshipPartner" is set on the OneToOne mapping for the back-reference, and basicIndirection is used, TopLink will automatically put the object in the parent's OneToMany collection when setValue() is called on the ValueHolderInterface, and thereafter it is essentially conformant within the UOW. Conversely if I create a child object and add it to the parent's collection, the back-reference will be set automatically on the child, as long as I use transparent indirection. I haven't tried it with basic indirection, but I suspect it won't work.
However, it does all this by instantiating the ValueHolder on the parent container and thereby triggering the clone-merge of all the objects in the collection. This is the symptom I'd hoped to avoid. If I don't set the relationshipPartner, on the child mapping I can avoid this, but now my data access logic gets more complicated. What I really want to do is have something like a UnitOfWork within the collection itself. I want add and remove operations to be deferred. When I add or remove something to the collection, it would be kept in a holding area which would be merged into the parent cache when committed, but the ValueHolder would not be triggered. If/when the entire contents of collection is needed within the UnitOfWork, the ValueHolder would be instantiated, the collection contents would be cloned, and then the added/removed objects in the holding area would be merged into the collection. Am I missing any reasons why this approach is technically not feasible?
The other suggestion to use the AttributeChangeTrackingPolicy has been considered, but I think that still won't be as good as what could be achieved by the above approach. There would still be a need to make clones for every object in the collection, and in order to avoid the drudgery of updating all my domain objects I'd have to resort to code-generation, or runtime method interception (we're not using CMP). I'm not quite ready to leap into that approach until all other alternatives have failed.
As for the query cache, I would have to invalidate the entire query cache whenever objects are added or removed either locally or remotely, correct? TopLink won't check each query cache when an object is merged to determine if the object still matches the query criteria, correct? Are you saying that I would need to create my own cache invalidation policy to do this? I could handle removed objects that way, but I'd still need to invalidate the cache for any additions, right?
I know this message is long. Please, any help is much appreciated.
- Bruno

Similar Messages

  • How to reduce purple color cast in high ISO Nikon D4 and D810 photos

    In low-light photos taken with my D4 and D810 I often (but not always) get a severe purple color cast in the dark areas of the photo. I'm going to try posting a link to an example of one such photo, which I've put in my Dropbox account. I hope this works:
    Dropbox - Example of magenta color cast-001.jpg
    If the link works, you'll see what I mean: the dark areas are purple, not black as they should be. This was taken at the dress rehearsal for a play at ISO 3200, about the lowest ISO that I could get away with. The purple cast seems more pronounced along the edges of the photo.
    I've read a bit about "amp glow"; is that what I'm seeing here? If it is, what can I do about it? Turning the camera off and on again and again to try to cool the sensor and the nearby electronics isn't much of an option.
    And whether it's "amp glow" or something else, is there a good way to deal with it in Lightroom? I've had some success with reducing the purple saturation (and sometimes the purple luminance as well) in the "HSL" panel, but that becomes a problem if there are important elements in the photo which are SUPPOSED to be purple.
    Any and all advice would be welcome.

    dorffersmatt wrote:
    Interestingly, my e-mail says there was another post about how to reduce the purple cast with proper in-camera settings, but now that post seems to have been deleted (by the poster? by somebody at Adobe?)
    The poster (Drugstore) may have deleted the post after reading further because it may not have been relevant......just a guess. If you're shooting raw format the in-camera settings such as white balance are not applied to the image file, but they are for JPEGs. The suggestions I provided are applicable to both JPEG and raw image files, but you'll get the best results using raw format.
    dorffersmatt wrote:
    1) You said that you sometimes see the purple cast with your D4 and D810 if the white balance isn't set properly. What would you consider a proper white balance setting for a situation such as this one? It was the dress rehearsal for a play, with constantly shifting lighting. I just left the white balance on "Auto"; how would you have approached the situation?
    Again, this only applies to JPEG format image files. For raw image files the WB EXIF data is read and set accordingly inside LR. For JPEGs the image data has the (incorrect?) WB applied in-camera, which compromises the dynamic range of the JPEG 8-bit/color data. Raw files are 16 bit/color.
    dorffersmatt wrote:
    2) You said that you also sometimes see it if "you activate the lens correction in LR while in raw mode and exposure is too low." Could you elaborate on that? Do you mean that I shouldn't use "Enable profile corrections" in the "Lens Corrections" panel?
    I'm guessing this refers to what you call "amp glow" (amplifier glow). It usually appears as a higher exposure level around the edge of the image and may be confined to one area (top, bottom, sides). By turning off Lens Profile corrections ( "Enable profile corrections") Vignetting correction is not applied, which reduces the exposure level in the corners and frame edges. Some cameras automatically apply distortion and/or vignetting correction in-camera when shooting in JPEG format. Again, this is just another reason why you want to use raw format to get the best results inside LR.

  • How to reduce reading and recording data time/ Visual C++, PCI 6024E and PCI-MIO-16E?

    Right now I am working on a data communication programme. The time of reading digital signal and recording data is more than I expected, which is about 100 microsecond. I need to reduce the time. The software I am using is Visual C++ 6.0. I use two DAQ boards, which are PCI-6024E and PCI-MIO-16E. I have set the priority of Visual C++ to be realtime by task manager. The operating systme is Windows XP.
    I am wondering how to set the interrupt of reading or writing data to be the highest and stop any other kind of interrupt.
    Thanks in advance!

    The primary limitation you will encounter when trying to do high speed
    digital I/O using your E-Series hardware is that the digital lines are
    all software timed.  This means that for each and every digital
    read it is necessary for your software to issue a command to your
    hardware, read a single point, then receive the response from the
    board.  This prevents you from performing digital operations at
    very high speed.  In general, I would say that 100 microseconds is
    a very good response using software-timed digital I/O on a Windows
    computer.
    It is difficult to make a good recommendation without more detail about
    what you are trying to do.  You may need to consider switching to
    a Real-Time operating system, or upgrading your DAQ hardware to a board
    that will allow you to time your digital acquisitions on the board
    itself.  These devices, such as the m-Series DAQ or the PCI-653x
    series, would allow you to use hardware triggers for your digital
    acquisitions, change detection, and buffered data acquisitions to
    reduce the software overhead involved in a rapid acquisition.

  • How to reduce jpg file size, not pixel dimensions?

    I am preparing images for the web and I really have 2 questions: one about gifs, and one about jpgs.
    My standard procedure is to reduce the image to the desired pixel dimensions at 600 dpi
    That gives me a crisp small image. then I either use it as is if the file size is low enough (I try for under 600 kb) or convert it to a gif with the save for web and devices tool.
    So here are my 2 questions (I will count this solved with either answer)
    1) When I convert to a gif I have the 4 boxes: one with original size, the other 3 with options but often the options are too low res for me How do I change my 3 options to start at a higher gif res?
    2) If I try to reduce the file size of the jpg in the image size box I set the resolution lower ( 400, 300), which lowers the pixel dimensions and the filesize, but I don't want to cahnge the pixel dimensions. And  If I reset the pixel dimensions back to the size I want them, even though it is a lower resolution the file size doesn't change. How to reduce jpg file size using only the resolution, not pixel dimensions?  PS I have tried messing with checking and unchecking the 3 little boxes( scale styles, constrain proportions, and resample) but nothing has worked.

    Gif is not a great filetype, especially if you want a crisp image. What are your pixel dimensions?
    For web, it makes no difference what the dpi is, only the final pixel dimensions so once you have that as you want, use 'Save for Web and Devices' and you can lower the quality - 100% being max and 0% being lowest. I wouldn't save anything below 55%. For a 600kb image, your dimensions must be rather big.

  • File size augments after editing a form? How to reduce size?

    Hello,
    I have been building a form and found that the size of my file grew after I made 'edits' onto (ie:  changing the wording of the original form scanned onto Acrobat Pro X, changing the font colour some letters etc.)
    Question 1:  Is this normal?
    Question 2: How to reduce the size of the file? (I am aware of the option that I could save the pdf into a version that's higher (by selecting anything between 6 to 10) and that would reduce the size of the pdf.
    BUT, I also learned that if the end-user, who will receive my form and fill it in, do not have that particular version that I've saved it to, then s/he could not fill in the form!!
    Is there a solution to my problem? Please help!
    *I am using Acrobat Pro X.

    Thank you all for your responses!
    Yes, I always save my file as PDF.   Just not reduced its size by saving it to a particular version.
    to 'Test Screen Name', there is a misunderstanding on option 2.  I referred to it so that I can save the file into a version like version 8.0 or higher.  But, I understood from earlier discussions in the forum here, that people may still have earlier versions of reader (ie 6.0 or lower?) and so that's why I suggested having a link for download.
    Even with that, I don't know how savvy my end-users may be to download.  I 've had problems where people read my file using Apple and that caused problems.

  • Urgent HELP - How to reduce the number of entries in table MESYBODY?

    Does anyone know how to reduce the number of records in synchronization table MESYBODY and MESYHEAD?  The reason I wanted to reduce these tables is because I believe they have so many duplicated entries that causes extremely slow performance everytime we sync.  Currently, there are almost 50,000 records for approximately 100 users, and I believe it shouldn't be that much. 
    We are running into a problem that it takes approximately 25-30 minutes to sync. 
    Any advices would be highly appreciated.
    Regards,
    Dai

    Hi Dai,
    please try to run the middleware job WAF_MW_MAPPING. For some applications (Mobile Time and Travel for example) this helps to clean the tables.
    Br, alex
    alexander ilg
    http://www.msc-mobile.com

  • How to reduce rollwait time..?

    Hi All,
    the production system is showing avg.diag.resp.time more than 7seconds since last one month.while analysing the avg.Roll wait time is about more than 2sec.kindly suggest how to reduce the roll wait time.
    Thanks & Regards
    Srinivas

    Hi Jaya,
    Few days back we had a long chat on this, may be this will help you to pin point the pain area.
    High roll wait Time
    Regards,
    Gagan Deep Kaushal

  • How to reduce the query fetch from TKPROF output?

    Hi,
    Below is my query contains the TKPROF output.Here fetch is too high. How to reduce the fetch from here. And please check the explain plan is good or not?
    SELECT  czci.config_hdr_id,
            czci.config_rev_nbr,
            asoqla.quantity,
             (SELECT
                    node_desc.LOCALIZED_STR
                 FROM   CZ_LOCALIZED_TEXTS node_desc,
                        CZ_PS_NODES ps_nodes,
                        CZ_CONFIG_ITEMS czci1
                WHERE   czci1.config_hdr_id = asoqld.config_header_id
                AND     czci1.config_rev_nbr = asoqld.config_revision_num
                AND    node_desc.INTL_TEXT_ID = ps_nodes.INTL_TEXT_ID
                AND     NVL(node_desc.LANGUAGE,userenv('LANG')) = userenv('LANG')
                AND     czci1.PS_NODE_ID = ps_nodes.PERSISTENT_NODE_ID
                 AND    ps_nodes.DEVL_PROJECT_ID = (SELECT MAX(DEVL_PROJECT_ID) FROM CZ_DEVL_PROJECTS WHERE NAME LIKE 'Control Model')
                AND czci1.PARENT_CONFIG_ITEM_ID IN (SELECT sub_sub.CONFIG_ITEM_ID FROM CZ_CONFIG_ITEMS sub_sub
                                                        WHERE sub_sub.CONFIG_HDR_ID = asoqld.config_header_id
                                                        AND sub_sub.CONFIG_REV_NBR = asoqld.config_revision_num
                                                        AND      sub_sub.PS_NODE_NAME = 'fittings')) fitting_material,
             (SELECT
                    node_desc.LOCALIZED_STR
                 FROM   CZ_LOCALIZED_TEXTS node_desc,
                        CZ_PS_NODES ps_nodes,
                        CZ_CONFIG_ITEMS czci
                WHERE   czci.config_hdr_id = asoqld.config_header_id
                AND     czci.config_rev_nbr = asoqld.config_revision_num
                AND    node_desc.INTL_TEXT_ID = ps_nodes.INTL_TEXT_ID
                AND NVL(node_desc.LANGUAGE,userenv('LANG')) = userenv('LANG')
                AND     czci.PS_NODE_ID = ps_nodes.PERSISTENT_NODE_ID
                 AND    ps_nodes.DEVL_PROJECT_ID = (SELECT MAX(DEVL_PROJECT_ID) FROM CZ_DEVL_PROJECTS WHERE NAME LIKE 'Control Model')
                AND czci.PARENT_CONFIG_ITEM_ID IN (SELECT sub_sub.CONFIG_ITEM_ID FROM CZ_CONFIG_ITEMS sub_sub
                                                        WHERE sub_sub.CONFIG_HDR_ID = czci.CONFIG_HDR_ID
                                                        AND sub_sub.CONFIG_REV_NBR = czci.CONFIG_REV_NBR
                                                        AND      sub_sub.PS_NODE_NAME = 'tubing')) tubing_material
    FROM    aso_quote_lines_all asoqla,
            aso_quote_line_details asoqld,
            cz_config_items czci
    WHERE   asoqla.quote_header_id = 55774
    AND     asoqla.item_type_code = 'MDL'
    --AND     asoqla.org_id = 2763
    AND     asoqla.quote_line_id = asoqld.quote_line_id
    AND     asoqld.config_header_id = czci.config_hdr_id
    AND     asoqld.config_revision_num = czci.config_rev_nbr
    AND     czci.ps_node_name = 'CONTROL MASTER ASLY'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.04       0.03          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        3      0.09       0.08          0       5100          0          19
    total        5      0.13       0.12          0       5100          0          19
    Misses in library cache during parse: 1
    Optimizer goal: ALL_ROWS
    Parsing user id: 173  (APPS)
    Rows     Row Source Operation
          3  TABLE ACCESS BY INDEX ROWID CZ_LOCALIZED_TEXTS (cr=2161 pr=0 pw=0 time=32425 us)
         40   NESTED LOOPS  (cr=2158 pr=0 pw=0 time=32276 us)
          3    NESTED LOOPS  (cr=2147 pr=0 pw=0 time=32156 us)
          3     NESTED LOOPS  (cr=925 pr=0 pw=0 time=15885 us)
          3      TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=665 pr=0 pw=0 time=13456 us)
       5490       INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=96 pr=0 pw=0 time=1237 us)(object id 3049621)
          3      TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=260 pr=0 pw=0 time=2401 us)
       1094       INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=19 pr=0 pw=0 time=250 us)(object id 3049621)
          3     TABLE ACCESS BY INDEX ROWID CZ_PS_NODES (cr=1222 pr=0 pw=0 time=16249 us)
          3      INDEX RANGE SCAN CZ_PS_NODES_N12 (cr=1219 pr=0 pw=0 time=16211 us)(object id 750095)
          1       SORT AGGREGATE (cr=1211 pr=0 pw=0 time=16125 us)
        209        TABLE ACCESS FULL CZ_DEVL_PROJECTS (cr=1211 pr=0 pw=0 time=15883 us)
         18    INDEX RANGE SCAN CZ_LOCALIZED_TEXTS_N1 (cr=11 pr=0 pw=0 time=68 us)(object id 31504)
          3  TABLE ACCESS BY INDEX ROWID CZ_LOCALIZED_TEXTS (cr=2161 pr=0 pw=0 time=31499 us)
         40   NESTED LOOPS  (cr=2158 pr=0 pw=0 time=31351 us)
          3    NESTED LOOPS  (cr=2147 pr=0 pw=0 time=31215 us)
          3     NESTED LOOPS  (cr=925 pr=0 pw=0 time=15271 us)
          3      TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=665 pr=0 pw=0 time=12441 us)
       5490       INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=96 pr=0 pw=0 time=1230 us)(object id 3049621)
          3      TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=260 pr=0 pw=0 time=2795 us)
       1094       INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=19 pr=0 pw=0 time=264 us)(object id 3049621)
          3     TABLE ACCESS BY INDEX ROWID CZ_PS_NODES (cr=1222 pr=0 pw=0 time=15920 us)
          3      INDEX RANGE SCAN CZ_PS_NODES_N12 (cr=1219 pr=0 pw=0 time=15863 us)(object id 750095)
          1       SORT AGGREGATE (cr=1211 pr=0 pw=0 time=15753 us)
        209        TABLE ACCESS FULL CZ_DEVL_PROJECTS (cr=1211 pr=0 pw=0 time=15452 us)
         18    INDEX RANGE SCAN CZ_LOCALIZED_TEXTS_N1 (cr=11 pr=0 pw=0 time=79 us)(object id 31504)
         19  TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=778 pr=0 pw=0 time=20571 us)
       5816   NESTED LOOPS  (cr=202 pr=0 pw=0 time=8497 us)
         21    NESTED LOOPS  (cr=96 pr=0 pw=0 time=2037 us)
         23     TABLE ACCESS BY INDEX ROWID ASO_QUOTE_LINES_ALL (cr=47 pr=0 pw=0 time=1427 us)
       1058      INDEX RANGE SCAN ASO_QUOTE_LINES_ALL_N1 (cr=9 pr=0 pw=0 time=51 us)(object id 81688)
         21     TABLE ACCESS BY INDEX ROWID ASO_QUOTE_LINE_DETAILS (cr=49 pr=0 pw=0 time=596 us)
         21      INDEX RANGE SCAN ASO_QUOTE_LINE_DETAILS_N1 (cr=28 pr=0 pw=0 time=323 us)(object id 81706)
       5794    INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=106 pr=0 pw=0 time=1424 us)(object id 3049621)

    Hi
    After affed the exist operator i got below output. But it is more than that the previous one.
    SELECT czci.config_hdr_id, czci.config_rev_nbr, asoqla.quantity,
           (SELECT node_desc.localized_str
              FROM cz_localized_texts node_desc,
                   cz_ps_nodes ps_nodes,
                   cz_config_items czci1
             WHERE czci1.config_hdr_id = asoqld.config_header_id
               AND czci1.config_rev_nbr = asoqld.config_revision_num
               AND node_desc.intl_text_id = ps_nodes.intl_text_id
               AND NVL (node_desc.LANGUAGE, USERENV ('LANG')) = USERENV ('LANG')
               AND czci1.ps_node_id = ps_nodes.persistent_node_id
               AND ps_nodes.devl_project_id = (SELECT MAX (devl_project_id)
                                                 FROM cz_devl_projects
                                                WHERE NAME = 'Control Model')
               AND EXISTS (
                      SELECT NULL
                        FROM cz_config_items sub_sub
                       WHERE sub_sub.config_hdr_id = asoqld.config_header_id
                         AND sub_sub.config_rev_nbr = asoqld.config_revision_num
                         AND sub_sub.ps_node_name = 'fittings'
                         AND czci1.parent_config_item_id = sub_sub.config_item_id))
                                                                 fitting_material,
           (SELECT node_desc.localized_str
              FROM cz_localized_texts node_desc,
                   cz_ps_nodes ps_nodes,
                   cz_config_items czci1
             WHERE czci1.config_hdr_id = asoqld.config_header_id
               AND czci1.config_rev_nbr = asoqld.config_revision_num
               AND node_desc.intl_text_id = ps_nodes.intl_text_id
               AND node_desc.LANGUAGE = USERENV ('LANG')
               AND czci1.ps_node_id = ps_nodes.persistent_node_id
               AND ps_nodes.devl_project_id = (SELECT MAX (devl_project_id)
                                                 FROM cz_devl_projects
                                                WHERE NAME = 'Control Model')
               AND EXISTS (
                      SELECT NULL
                        FROM cz_config_items sub_sub
                       WHERE sub_sub.config_hdr_id = czci.config_hdr_id
                         AND sub_sub.config_rev_nbr = czci.config_rev_nbr
                         AND sub_sub.ps_node_name = 'tubing'
                         AND czci1.parent_config_item_id = sub_sub.config_item_id))
                                                                  tubing_material
      FROM aso_quote_lines_all asoqla,
           aso_quote_line_details asoqld,
           cz_config_items czci
    WHERE asoqla.quote_header_id = 55774
       AND asoqla.item_type_code = 'MDL'
    --AND     asoqla.org_id = 2763
       AND asoqla.quote_line_id = asoqld.quote_line_id
       AND asoqld.config_header_id = czci.config_hdr_id
       AND asoqld.config_revision_num = czci.config_rev_nbr
       AND czci.ps_node_name = 'CONTROL MASTER ASLY'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.02       0.03          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        3      0.16       0.14          0      16526          0          19
    total        5      0.18       0.17          0      16526          0          19
    Misses in library cache during parse: 1
    Optimizer goal: ALL_ROWS
    Parsing user id: 173  (APPS)
    Rows     Row Source Operation
          3  TABLE ACCESS BY INDEX ROWID CZ_LOCALIZED_TEXTS (cr=7874 pr=0 pw=0 time=51192 us)
         40   NESTED LOOPS  (cr=7871 pr=0 pw=0 time=50953 us)
          3    NESTED LOOPS  (cr=7860 pr=0 pw=0 time=50729 us)
          3     TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=6638 pr=0 pw=0 time=33183 us)
          3      INDEX RANGE SCAN CZ_CONFIG_ITEMS_N1 (cr=6635 pr=0 pw=0 time=33060 us)(object id 31734)
          3       TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=6536 pr=0 pw=0 time=22873 us)
       1292        INDEX UNIQUE SCAN CZ_CONFIG_ITEMS_PK (cr=5244 pr=0 pw=0 time=15326 us)(object id 3049621)
          3     TABLE ACCESS BY INDEX ROWID CZ_PS_NODES (cr=1222 pr=0 pw=0 time=17483 us)
          3      INDEX RANGE SCAN CZ_PS_NODES_N12 (cr=1219 pr=0 pw=0 time=17411 us)(object id 750095)
          1       SORT AGGREGATE (cr=1211 pr=0 pw=0 time=17266 us)
        209        TABLE ACCESS FULL CZ_DEVL_PROJECTS (cr=1211 pr=0 pw=0 time=16844 us)
         18    INDEX RANGE SCAN CZ_LOCALIZED_TEXTS_N1 (cr=11 pr=0 pw=0 time=122 us)(object id 31504)
          3  NESTED LOOPS  (cr=7874 pr=0 pw=0 time=48203 us)
          3   NESTED LOOPS  (cr=7860 pr=0 pw=0 time=47973 us)
          3    TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=6638 pr=0 pw=0 time=30352 us)
          3     INDEX RANGE SCAN CZ_CONFIG_ITEMS_N1 (cr=6635 pr=0 pw=0 time=30218 us)(object id 31734)
          3      TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=6536 pr=0 pw=0 time=20960 us)
       1292       INDEX UNIQUE SCAN CZ_CONFIG_ITEMS_PK (cr=5244 pr=0 pw=0 time=14224 us)(object id 3049621)
          3    TABLE ACCESS BY INDEX ROWID CZ_PS_NODES (cr=1222 pr=0 pw=0 time=17570 us)
          3     INDEX RANGE SCAN CZ_PS_NODES_N12 (cr=1219 pr=0 pw=0 time=17510 us)(object id 750095)
          1      SORT AGGREGATE (cr=1211 pr=0 pw=0 time=17395 us)
        209       TABLE ACCESS FULL CZ_DEVL_PROJECTS (cr=1211 pr=0 pw=0 time=16937 us)
          3   TABLE ACCESS BY INDEX ROWID CZ_LOCALIZED_TEXTS (cr=14 pr=0 pw=0 time=165 us)
          3    INDEX UNIQUE SCAN CZ_LOCALIZED_TEXTS_PK (cr=11 pr=0 pw=0 time=132 us)(object id 3050530)
         19  TABLE ACCESS BY INDEX ROWID CZ_CONFIG_ITEMS (cr=778 pr=0 pw=0 time=41677 us)
       5816   NESTED LOOPS  (cr=202 pr=0 pw=0 time=16173 us)
         21    NESTED LOOPS  (cr=96 pr=0 pw=0 time=3617 us)
         23     TABLE ACCESS BY INDEX ROWID ASO_QUOTE_LINES_ALL (cr=47 pr=0 pw=0 time=2528 us)
       1058      INDEX RANGE SCAN ASO_QUOTE_LINES_ALL_N1 (cr=9 pr=0 pw=0 time=83 us)(object id 81688)
         21     TABLE ACCESS BY INDEX ROWID ASO_QUOTE_LINE_DETAILS (cr=49 pr=0 pw=0 time=1053 us)
         21      INDEX RANGE SCAN ASO_QUOTE_LINE_DETAILS_N1 (cr=28 pr=0 pw=0 time=598 us)(object id 81706)
       5794    INDEX RANGE SCAN CZ_CONFIG_ITEMS_PK (cr=106 pr=0 pw=0 time=8245 us)(object id 3049621)

  • How to Reduce Clusetering Factor on Table?

    I am seeing a very high clustering factor on an SDO geometry table in our 10g RAC DB on our Linux boxes. This slow performance is repeateable on othe r Linux as well as Solaris DBs for the same table. Inserts go in at a rate of 44 milliseconds per insert and we only have about 27000 rows in the table. After viewing a VERY slow insert of about 600 records into this same table, I saw the clustering factor in OEM. The clustering factor is nearly identical to the # rows in the table indicating that useability of the index is fairly low now. I have referenced Metalink Tech Note 223117.1 and, while it affirms what I've seen, I am still trying to determine how to reduce the Clustering Factor. The excerpt on how to do this is below:
    "The only method to affect the clustering factor is to sort and then store the rows in the table in the same order as in they appear in the index. Exporting rows and putting them back in the same order that they appeared originally will have no affect. Remember that ordering the rows to suit one index may have detrimental effects on the choice of other indexes."
    Sounds great, but how does one actually go about storing the rows in the table in the same order as they appear in the index?
    We have tried placing our commits after the last insert as well as after every insert and the results are fairly neglible. We also have a column of type SDE.ST_GEOMETRY in the table and are wondering if this might also be an issue. Thanks in advance for any help.
    Matt Sauter

    Joel is right that the clustering factor is going to have absolutely no effect on the speed of inserts. The clustering factor is merely one, purely statistical, factor the optimiser makes use of to determine how to perform a SELECT statement (i.e., do I bother to use this index or not for row retrieval). It's got nothing to do with the efficiency of inserts.
    If I were you, I'd be looking at factors such as excessive disk I/O taking place for other reasons, inadequate buffer cache and/or enqueue and locking issues instead.
    If you're committing after every insert, for example, then redo will have to be flushed (a commit is about the only foreground wait event -i.e., one that you get to experience in real time- that Oracle has, so a commit after every insert's really not a smart idea). If your redo logs are stored on, say, the worst-performing disk you could buy that's also doing duty as a fileserver's main hard disk, then LGWR will be twiddling its thumbs a lot! You say you've tested this, and that's fine... I'm just saying, it's one theoretical possibility in these sorts of situations. You still want to make sure you're not suffering any log writer-related waits, all the same.
    Similarly, if you're performing huge reads on a (perhaps completely separate) table that is causing the buffer cache to be wiped every second or so, then getting access to your table so your inserts can take place could be problematic. Check if you've got any database writer waits, for example: they are usally a good sign of general I/O bottlenecks.
    Finally, you're on a RAC... so if the blocks of the table you're writing to are in memory over on another instance, and they have to be shipped to your instance, you could have high enqueue waits whilst that shipment is taking place. Maybe your interconnect is not up to the job? Maybe it's faulty, even, with significant packet loss along the way? Even worse if someone's decided to switch off cache fusion transfer for the datafiles invoved (for then block shipment happens by writing them to disk in one instance and reading from disk in the other). RAC adds a whole new level of complexity to things, so good luck tracking that lot down!!
    Also, maybe you're using Freelists and Freelist groups rather than ASSM, so perhaps you're fighting for access to the freelist with whatever else is happening on your database at the time...
    You get the idea: this could be a result of activity taking place on the server for reasons completely unconnected with your insert. It could be a feature of Spatial (with which not many people will be familiar, so good luck if so!) It could be a result of the way your RAC is configured. It could be any number of things... but I'd be willing to bet quite a bit that it's got sod-all to do with the clustering factor!
    You'll need to monitor the insert using a tool like Insider or Toad so you can see if waits and so on happen, more or less in real time -or start using the built-in tools like Statspack or AWR to analyze your workload after it's completed- to work out what your best fix is likely to be.

  • How to Reduce cost of full table scan or remove full table scan while execu

    Dear Experts
    need your help.
    I execute a query and create a explain plan in that plan i found cost of a table is very high (2777) and it was full table scan.
    Please guide me How to Reduce cost of full table scan or remove full table scan while execute the query.
    Thanks

    Need your help to tune this query..
    SELECT DISTINCT ool.org_id, ool.header_id, ooh.order_number, ool.line_id,
    ool.line_number, ool.shipment_number,
    NVL (ool.option_number, -99) option_number, xcl.GROUP_ID,
    xcl.attribute3, xcl.attribute4
    FROM oe_order_headers ooh,
    xxcn_comp_header xch,
    xxcn_comp_lines xcl,
    fnd_lookup_values_vl fvl,
    oe_order_lines ool
    WHERE 1 = 1
    AND ooh.org_id = 1524
    AND xch.src_ref_no = TO_CHAR (ooh.order_number)
    AND xch.src_ref_id = ooh.header_id
    AND xch.org_id = 1524
    AND xcl.header_id = xch.header_id
    AND ool.line_id = xcl.oe_line_id
    AND ool.flow_status_code IN
    ('WWD_SHIPPED',
    'FULFILLED',
    'SHIPPED',
    'CLOSED',
    'RETURNED'
    AND ool.org_id = 1524
    AND ool.header_id = ooh.header_id
    AND xch.org_id = 1524
    AND fvl.lookup_type = 'EMR OIC SOURCE FOR OU'
    AND fvl.tag = '1524'
    AND fvl.description = xch.SOURCE
    AND EXISTS (
    SELECT 1
    FROM oe_order_lines oe
    WHERE oe.header_id = ool.header_id
    AND oe.org_id = 1524
    AND oe.line_number = ool.line_number
    AND oe.ordered_item = ool.ordered_item
    AND oe.shipment_number > ool.shipment_number
    AND NVL (oe.option_number, -99) =
    NVL (ool.option_number,
    -99)
    AND NOT EXISTS (
    SELECT 1
    FROM xxcn_comp_lines xcl2
    WHERE xcl.GROUP_ID = xcl2.GROUP_ID
    AND oe.line_id = oe_line_id))
    call count cpu elapsed disk query current rows
    Parse 1 0.07 0.12 12 25 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 2 103.03 852.42 176206 4997766 0 12
    total 4 103.10 852.55 176218 4997791 0 12
    In this LIO is very high...can u please help in resolving this performance issue

  • How to reduce the cloning time if using cold backup?

    Hi,
    We are using EBS r12 (12.0.6) with database 10.2.0.3 in Linux Redhat 4 32-bit envoirnment.
    Our datbase size is around 480 GB and we are facing the issues to provide the clone to my consultants for meet the target timelines in given time.
    (Source:)---- Production Dell R900 Server machine having 32-GB RAM and 8 Quard Core CPU's.
    (Target:)---- Clone Dell 2950 Server machine having 16-GB RAM and 4-Quard Core CPU's.
    Currectly we are taking cold backup like:
    1: Auto shutdown EBS r12 database nighthy at 12:00 AM daily and compress the backup using tar utility in linux. This process takes 6:00 hours aprox:
    2: After that we move compressed file to clone machine and then uncompressed it, and this process takes 5:00 hours aprox.
    3: And performe standard cloning steps.
    Questions:
    1: How to reduce time of this backup process?
    3: Is there any other way to reduce the cloning process.
    2: What type of backup oracle recommended to their customers for this type of process?
    Thanks.

    1: How to reduce time of this backup process?Without using third party tools, it might be hard to tune the timing of compressing/uncompressing the file.
    Have you tried to use scp command? This would help if your network throughput is acceptable.
    3: Is there any other way to reduce the cloning process.Since the main issue you have with the copy, then you might copy the files remotely from the source to the target, or using any other storage/backup tools (like file system snapshot).
    2: What type of backup oracle recommended to their customers for this type of process?Oracle does not recommend any type of backup as the tools used are not Oracle products.
    Thanks,
    Hussein

  • How to reduce PSAPSR3 from DB02

    Hi All,
    Please find the screenshot of DB02. I want to reduce the Table space of PSAPSR3 from the below screen. we are holding only 15 days of data in the PSA. Can you pls tell me what is this table "PSAPSR3" related to.
    Please guide how to reduce the total used percentage (84%) from the screenshot.
    Thanks.

    Hi,
    You can reduce the table space for PSAPSR3 by deleting data requests from PSA.
    As you have mentioned that you are keeping 15 days of data in PSA. But its better if you rethink on this strategy. For the PSA tables having high size with delta datasource, you can to keep the data requests from last 7 days or so to keep the size in control.
    Also for full loads, you can keep only last successful request. And before loading new data request you can delete the last request.
    Hope this will help you to reduce the table space for PSAPSR3.
    Regards,
    Pradip

  • How to reduce scale at installation of wall-paper by iPad?

    How to reduce scale at installation of wall-paper by iPad?

    If you go in through the photos app you have a bit more control, but not a lot.
    FIrst, go into the control panel, accessibility and turn off the parallax motion. Then go into your photos app, find the image and 'send' it to be wallpaper by tapping the box with the arrow poking out of it.
    The higher resolution your image is the more control you'll have. The default is that the whole screen must be covered and iPad screens are 1024 x 768 or larger, so if you have a 300 x 400 pixel image, you won't have much control at all but if your image is - pixel wise - larger than your screen, you'll have more wiggle room.
    It's not perfect and isn't as much control as it used to be, but you'll have more than just going in through the wallpaper controls.

  • How to reduce Post-Processing time in oracle applications R12?

    Hi All,
    I ran a XMLP concurrent program at 16-APR-2015 11:23:52 . It's completed at 16-APR-2015 11:30:41. So it took 6 minute 49 seconds. I check the query in sql developer, it's executing less than two minutes. When I check the log file of that program shows the following info...
    Beginning post-processing of request 22226009 on node DEV at 16-APR-2015 11:24:43.
    Post-processing of request 22226009 completed at 16-APR-2015 11:30:41.
    So what is the reason?, and how to reduce the time?

    HTML is a simple format (Text).
    Excel is more complicated and requires more time to generate. The same applies for Word and PDF output.
    Maybe the processing power and memory of the server are not high and this does not help generate the output faster.
    I have a workaround for you, generate an XML file (which should finish faster) and open it in Excel.

  • How to reduce the size of the query

    Hi all,
    Can any one suggest me how to reduce the size of the following query .
    /* Formatted on 2011/07/12 11:02 (Formatter Plus v4.8.8) */
    SELECT prs.pa_rqst_srvc_sid,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5031'
    AND ped.aaa_segment_loop_nmbr = '2000F') revenue_iid,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5013'
    AND ped.aaa_segment_loop_nmbr = '2000F') x12_code_list_qlfr_lkpcd,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5026'
    AND ped.aaa_segment_loop_nmbr = '2000F') procedure_iid,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5027'
    AND ped.aaa_segment_loop_nmbr = '2000F') mdfr_code,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5028'
    AND ped.aaa_segment_loop_nmbr = '2000F') mdfr2_code,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5029'
    AND ped.aaa_segment_loop_nmbr = '2000F') mdfr3_code,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5030'
    AND ped.aaa_segment_loop_nmbr = '2000F') mdfr4_code,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5014'
    AND ped.aaa_segment_loop_nmbr = '2000F') rqst_prcdr_amt,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5015'
    AND ped.aaa_segment_loop_nmbr = '2000F') srvc_line_rate,
    'NA' drug_desc, 'NA' product_service_id, 'NA' uom_code,
    'NA' rqst_prcdr_units
    FROM pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request pr,
    pa_request_service prs,
    pa_request_procedure prp
    WHERE ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    AND pr.pa_rqst_sid = prs.pa_rqst_sid
    AND prs.pa_rqst_srvc_sid = prp.pa_rqst_srvc_sid
    AND pr.oprtnl_flag = 'A'
    AND prs.oprtnl_flag = 'A'
    AND ptr.oprtnl_flag = 'A'
    AND prp.oprtnl_flag = 'A'
    AND prs.rqst_ctgry_lkpcd = 'AR'
    AND ibf.original_file_name = 'HIPAA.165760000.20110613I001.278_IRej.dat';
    Thanks,
    P Prakash

    Hi,
    Maybe like that, but keep in mind that it is highly untested_ :SELECT
      prs.pa_rqst_srvc_sid,
      pvt.c5031 revenue_iid,
      pvt.c5013 x12_code_list_qlfr_lkpcd,
      pvt.c5026 procedure_iid,
      pvt.c5027 mdfr_code,
      pvt.c5028 mdfr2_code,
      pvt.c5029 mdfr3_code,
      pvt.c5030 mdfr4_code,
      pvt.c5014 rqst_prcdr_amt,
      pvt.c5015 srvc_line_rate,
      srvc_line_rate,
      'NA' drug_desc,
      'NA' product_service_id,
      'NA' uom_code,
      'NA' rqst_prcdr_units
    FROM
      pa_transaction_request ptr,
      input_acknwldgmnt ia,
      input_batch_file ibf,
      pa_request pr,
      pa_request_service prs,
      pa_request_procedure prp,
        SELECT
          prpre.pa_rqst_prcdr_sid,
          MAX(DECODE(pa_error_nmbr,'5013',prpre.erroneous_data_value,NULL)) c5013,
          MAX(DECODE(pa_error_nmbr,'5014',prpre.erroneous_data_value,NULL)) c5014,
          MAX(DECODE(pa_error_nmbr,'5015',prpre.erroneous_data_value,NULL)) c5015,
          MAX(DECODE(pa_error_nmbr,'5026',prpre.erroneous_data_value,NULL)) c5026,
          MAX(DECODE(pa_error_nmbr,'5027',prpre.erroneous_data_value,NULL)) c5027,
          MAX(DECODE(pa_error_nmbr,'5028',prpre.erroneous_data_value,NULL)) c5028,
          MAX(DECODE(pa_error_nmbr,'5029',prpre.erroneous_data_value,NULL)) c5029,
          MAX(DECODE(pa_error_nmbr,'5030',prpre.erroneous_data_value,NULL)) c5030,
          MAX(DECODE(pa_error_nmbr,'5031',prpre.erroneous_data_value,NULL)) c5031
        FROM
          pa_error pe,
          pa_error_detail ped,
          pa_request_procedure_run_error prpre
        WHERE
          pe.pa_error_sid     = ped.pa_error_sid
        AND ped.pa_error_sid  = prpre.pa_error_sid
        AND ped.oprtnl_flag   = 'A'
        AND prpre.oprtnl_flag = 'A'
        AND pe.pa_error_nmbr IN ('5013','5014','5015','5026','5027','5028','5029',
          '5030','5031')
        AND ped.aaa_segment_loop_nmbr = '2000F'
        GROUP BY
          prpre.pa_rqst_prcdr_sid
      pvt
    WHERE
      pvt.pa_rqst_prcdr_sid       = prp.pa_rqst_prcdr_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid   = ibf.input_batch_file_sid
    AND ptr.pa_trnsctn_rqst_sid   = pr.pa_trnsctn_rqst_sid
    AND pr.pa_rqst_sid            = prs.pa_rqst_sid
    AND prs.pa_rqst_srvc_sid      = prp.pa_rqst_srvc_sid
    AND pr.oprtnl_flag            = 'A'
    AND prs.oprtnl_flag           = 'A'
    AND ptr.oprtnl_flag           = 'A'
    AND prp.oprtnl_flag           = 'A'
    AND prs.rqst_ctgry_lkpcd      = 'AR'
    AND ibf.original_file_name    = 'HIPAA.165760000.20110613I001.278_IRej.dat';Edited by: Nicosa on Jul 12, 2011 2:20 PM
    Corrected columns aliases in outer query :
    - c5031 instead of 5031
    - c5013 instead of 5013

Maybe you are looking for

  • How do I install a free trial of Adobe CS 5.5 Design/Web Student and Teacher edition?

    I have the serial number but my disks were lost due to a car fire. I tried the serial number with Adobe 6 but it doesn't work. I would really appreciate any help.

  • PROBLEM RUNNING LIGHTROOM IN LEOPARD

    Hello, I have installed Lightroom to demo and when launching the application i get the following message and the app won't run: The Lightroom catalog folder at /Users/Pictures/Lightroom cannot be used because the folder does not allow files to be cre

  • Tuning the BOM of a new material

    Hi experts, When a new material will be launched,  what is the best way to tune its BOM 1) Can we create a BOM with a USAGE different to 1 = Production? 2) Does this new BOM can be used in a routing? 3) Can we create a planned order without a previou

  • Targets Using Virtual Hosts Show A "Down" Status in OEM 10gR2

    Hello all. I have two databases (10.2.0.2 and 9.2.0.7) that are each using virtual hostnames in a clustered environment. These databases have been verified to be up and running and their respective listeners are up as well. In the Monitoring Configur

  • Region in Timezone

    Hello, We have a requirement to display time zone in characters. For Eg : SQL> select systimestamp from dual; SYSTIMESTAMP 04-MAR-09 11.21.53.912000 PM -05:00 We would like to display this result as 04-MAR-09 11.21.53.912000 PM US/Eastern or 04-MAR-0