Change order of Index

I have two tables.
Tab_A
=======
col_a number
Tab_B
======
col_b number
Tab_A has index ind_a and Tab_B has index ind_b
Tab_A has 400000 records and Tab_B has 800000 records.
delete from Tab_A where exists(select 1 from Tab_B where tab_a.col_a=tab_b.col_b
and tab_b.col_b=1
) and tab_a.col_a=1
In the explain plan Ind_B is used firast and Ind_A is used after that.
Since the number of records in Tab_B is more the DML is very slow.
Is there any way to force Ind_a first and then Ind_b.
Thanks in Advance

It is possible that I am missing something here, but isn't that just
DELETE FROM tab_a
WHERE col_a = 1If the existence of a record in B is really important, you might try something like:
DELETE FROM tab_a
WHERE EXISTS(SELECT 1 FROM tab_b
             WHERE col_b=1) and
      tab_a.col_a=1John

Similar Messages

  • Help with fuzzy search (doesn't work if change order of certain 2 letters)

    Hi,
    need some help with fuzzy search. It's pretty simple - we use fuzzy search on varchar2 columns that contain first name and last_name. The problem is that i don't really understand why it can't find name in some cases.
    Say i want to search for 'Taekpaul'. Then
    where CONTAINS(first_name,'fuzzy(TAEKPAUL)',1) > 0 - works
    where CONTAINS(first_name,'fuzzy(TAEKPALU)',1) > 0 - works (changed order of the 2 last letters)
    where CONTAINS(first_name,'fuzzy(TEAKPAUL)',1) > 0 - doesn't work, finds 'Tejpaul' that is completely unrelated (changed 2nd, 3rd order)
    How can i make it find 'Taekpaul' even if i search for TEAKPAUL? Is it related to index? Like Text index should be created with some different parameters?
    Thanks!
    Edited by: Maitreya2 on Mar 3, 2010 2:08 PM

    Thanks, adding '!' worked :)
    Do you know where i can read more about '!' and other special characters? I think i didn't see anything like that here: http://download.oracle.com/docs/cd/B14117_01/text.101/b10730/cqoper.htm#BABBJGFJ
    I also started using JARO_WINKLER_SIMILARITY function that is actually better i think for what i do. But it's very buggy - sometimes Oracle crashes and kills connection when you try to use it.
    Ahha, it's here: http://download.oracle.com/docs/cd/B19306_01/text.102/b14218/cqspcl.htm
    So, ! is soundex. Whatever it means..
    Edited by: Maitreya2 on Mar 5, 2010 12:14 PM

  • How to hint hash join order on indexes ?

    Hi,
    in my 9.2.0.8 DB I've got query like this:
    SELECT COUNT (agreementno) cnt
    FROM followup
    WHERE agreementno = :v001 AND actioncode = :v002 AND resultcode = :v003;
    Plan
    SELECT STATEMENT  CHOOSECost: 11  Bytes: 18  Cardinality: 1                      
         5 SORT AGGREGATE  Bytes: 18  Cardinality: 1                 
              4 VIEW index$_join$_001 Cost: 11  Bytes: 18  Cardinality: 1            
                   3 HASH JOIN  Bytes: 18  Cardinality: 1       
                        1 INDEX RANGE SCAN NON-UNIQUE IDX_FOLLOWUP06 Cost: 13  Bytes: 18  Cardinality: 1 
                        2 INDEX RANGE SCAN UNIQUE PK_FOLLOWUP Cost: 13  Bytes: 18  Cardinality: 1  I need to change join order of indexes, so the proble one would be PK_FOLLOWUP .
    Of course the best plan is index range scan on pk but during to hight CF Oracle is combining 2 indexes .
    Regards.
    Greg

    Hmm sorry for red-herring.
    I guess you could also consider hand-coding the index join, something like:
    SELECT /*+ ORDERED USE_HASH (b) */
           COUNT (a.empno)
    FROM  (SELECT e.empno
           FROM emp e
           WHERE e.empno > 7000) a,
          (SELECT e.empno
           FROM emp e
           WHERE e.ename LIKE 'S%') b
    WHERE  a.ROWID = b.ROWID;or...
    WITH e AS
         (SELECT e.empno, e.ename
            FROM emp e)
    SELECT /*+ ORDERED USE_HASH (b) */
           COUNT (a.empno)
    FROM   e a, e b
    WHERE  b.ename LIKE 'S%'
    AND    a.empno > 7000
    AND    a.ROWID = b.ROWID;

  • Change order address (iw32)

    I have created custom tcode similar to that of Iw32 and i need to add  functionality to change of address button.
    I should be able to change the address and post back ..
    Please let me know if there is any bapi/ fm to change the address

    Transaction Code - IW32                     CHANGE ORDER
    Exit Name           Description
    IWO10012            Maintenance order: Priority handling on central header
    No of Exits:          1
    BAPI-step by step procedure
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all BAPI's
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    FUNCTION MODULES
    http://www.erpgenie.com/abap/functions.htm
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    http://www.erpgenie.com/abap/index.htm
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Rewards if useful.........
    Minal

  • Change order of key figure is not working in Web report output (using WAD)

    Hi,
    We are using BI 7.0, release 701 and level 008. We are facing problem in WAD (web report output). When ever we do 'Select filter' for key figures and 'change the order' of key figures, it does not get reflected in new order. Though drag and drop of key figures is working.
    Though same change order is working fine in Bex Analyser.
    Kindly suggest some inputs.
    Thanks.

    Hi,
    On Which Service Pack are you on?WAD has this feature of re arranging the keyfigures in BI 7.0 for SPS 14...
    Regards,
    Bhagyarekha.

  • Column Order of index on 12M record table

    I have table name
    tablea
    Fields
    kickoff_id int
    and
    status int
    and many others.....
    Now tablea contain 12M records.
    I have query
    Select * from
    tablea
    where
    status =2 and kickoff_id > 0
    status can have three possible values 0,1,2
    and
    kickoff_id can have 0 to 8 values....
    I am planning to make an index on status and kickoff_id
    So what should be preferrable order of index...
    status,kickoff_id
    or
    kickoff_id and status
    Regards
    Mahesh

    I would think the column which restricts the number of rows to a greater extent should come first.
    also, here is someting from Oracle documentation that may help you decide on type of index that will be better suited for
    your requirement.
    ===============================================================================================================
    Cardinality
    The advantages of using bitmap indexes are greatest for low cardinality columns: that is, columns in which the number of distinct values is small compared to the number of rows in the table. If the number of distinct values of a column is less than 1% of the number of rows in the table, or if the values in a column are repeated more than 100 times, then the column is a candidate for a bitmap index. Even columns with a lower number of repetitions and thus higher cardinality can be candidates if they tend to be involved in complex conditions in the WHERE clauses of queries.
    For example, on a table with 1 million rows, a column with 10,000 distinct values is a candidate for a bitmap index. A bitmap index on this column can out-perform a B-tree index, particularly when this column is often queried in conjunction with other columns.
    B-tree indexes are most effective for high-cardinality data: that is, data with many possible values, such as CUSTOMER_NAME or PHONE_NUMBER. In some situations, a B-tree index can be larger than the indexed data. Used appropriately, bitmap indexes can be significantly smaller than a corresponding B-tree index.
    In ad hoc queries and similar situations, bitmap indexes can dramatically improve query performance. AND and OR conditions in the WHERE clause of a query can be quickly resolved by performing the corresponding Boolean operations directly on the bitmaps before converting the resulting bitmap to rowids. If the resulting number of rows is small, the query can be answered very quickly without resorting to a full table scan of the table.
    =============================================================================================================================
    I have table name
    tablea
    Fields
    kickoff_id int
    and
    status int
    and many others.....
    Now tablea contain 12M records.
    I have query
    Select * from
    tablea
    where
    status =2 and kickoff_id > 0
    status can have three possible values 0,1,2
    and
    kickoff_id can have 0 to 8 values....
    I am planning to make an index on status and kickoff_id
    So what should be preferrable order of index...
    status,kickoff_id
    or
    kickoff_id and status
    Regards
    Mahesh

  • Change order of line items in a financial document

    Hello,
    Is it possible to define the order of the line items in a financial  document?
    For example, I have always a discount line with a discount account in the first place and after this line, the customer line, and the bank account and I need to have the customer line in the fist place, is it possible to customize this order?Or is this standard?
    Thank you very much!!

    Hi,
    You can change orders in FInancial Document. Just open the document from Menu select Settings-> Layout--> Current.
    change the position numbers as desired.
    Regards,
    JA

  • Changing Order of Songs in Album-iTunes 12

    Like the title says, how do I change the order of songs in a album? Before you could use get info and sort by track number.
    Thanks

    Hey Lando25,
    I understand that you want to change order of songs that are playing in iTunes. This functionality should still be available to you, as confirmed in this article:
    iTunes 12 for Mac: Edit song and CD information
    https://support.apple.com/kb/PH19618
    You may need to simply scroll in the information field in order to find the fields that you wish to edit. Thanks for coming to the Apple Support Communities!
    Cheers,
    Braden

  • HT201317 change order of photos in photo stream album

    How do I change order of photos posted in photo stream album?

    Send a feature request to Apple via
    http://www.apple.com/feedback/iphoto.html
    and
    http://www.apple.com/feedback/icloud.html
    OT

  • How to look for SAP provided rules while changing orders ?

    Hi:
    we have a requirement to check for order type when the change order request ( in form of IDOC via EDI)  is passed to SAP and the requirement is such that we can only accept certain order types like TA and reject order order type........from a very high level though process the idea is to check if SAP has certain pre build code that can be called before the va02 is called.....
    I am new to sap and was told that we need to first look if SAP has a existing functionality if not then find user exit and customize it .....
    my question is where does one look in SAP for such code ...or out of the box feature..........which can be called ....I understand if nothing is found we can write ABAP program to do this.....but I am puzzled as I do not now where to look and eliminate that such feature is not already provide ......
    Thanks

    check which FM you use to post your IDOC (like IDOC_INOUT_ORDCHG) and then check in this FM ... you'll find exits like 'call customer-function'.... I'm sure you'll find one which is called to validate data passed in your segment (where actual order type is passed).... or just use the one which works always after the order number is known and then just check your order type & raise error to fail IDOC so it will not even try to update your order.

  • How to change order data in APO

    Hi,
    I am keen to know on ways to change order data in APO say order category BI.....we want to change date by taking input from cif user exit APOCF006.We need this information for the ongoing  project.
    I know two options...1) using BAPIs  2) Not very sure about this option ...Function Module:/SAPAPO/OMORDER*CHANGE.
    Could you  please help to have better understanding on ways to change orders  in APO?
    Thank you
    Best Regards
    Nilesh Patil

    Hello Rishi,
    Thanks for your reply.
    Demand node ofr purchase Ordre( BF) in SNP is Conrel( BI category). We want to change date( start date) at this demand node . We will get this date from R3 using say non cif method.
    There are few ways to do it....
    1) If we ignore Menas of Transport( so essentially transit time or lead time in tlane)  in that purchase order  and change this requirement date directly using purchase order save BAPI( requirement node) ......Question will system allow us to do so and even if it allows us to do so will it casue some problem( inconsistencies) later?
    2) Second option I am thinking is...
    For one product we maiantain GR processing time in product location master and this is considered while determining strat date of BI (Start date=  Delivery date -GR procesisng time- means of Transport lead time - some other times ....). For this product let's say we have 100 Purchase Orders (BF). We have requirement that each of these POs should get separate treatment while calculating Start date. It means start date can be different for different POs and once we change it forcibly then it shoulkd not change unless we again change it forcibly.
    We are thinking to change GR processing time at runtime wheneveer Purchase Order is changed. So if GR time in product location master is 1 day ....for different Purchase Orders different GR processing time can be considered. Say for Po1...its 2 day...for P2 its 4 day.
    Or similar way we  can change transit time as given in means of transport in tlanes.
    Will appreciate your or anyone's comment
    Thank you
    Nilesh

  • Change order of list items in sealed MP

    Hi,
    I have a MP that is sealed. It includes a list, but also list items exist in that sealed MP. I need to reorder the list. I have the unsealed MP and the seal used. Can i just edit the unsealed version, changing order in the XML code and increase ver. nr.
    and if yes then how?

    Hi,
    I did a test in my lab and just edited the xml version of the MP. I changed the numbers in ordinal to rearrange, incremented the version # plus resealed and imported.
    <EnumerationTypes>
    <EnumerationValue ID="IncidentPriorityList" Accessibility="Public" />
    <EnumerationValue ID="Enum.cd7c7616b19745ffb646e0320ba85bb4" Accessibility="Public" Parent="IncidentPriorityList" Ordinal="0" />
    <EnumerationValue ID="Enum.8ae91ca8f3a7439eb2941c4a1547908c" Accessibility="Public" Parent="IncidentPriorityList" Ordinal="2" />
    <EnumerationValue ID="Enum.0d5e33cc41504a4eaf66b64b2dff3a2d" Accessibility="Public" Parent="IncidentPriorityList" Ordinal="1" />
    </EnumerationTypes>

  • PO Change Order Number!

    Hi friends,
    If i want to make some changes in existing purchase order before GR, i want to make it using a different change order number for the existing PO number so that i can review the history of changes being made.
    Plz help out!
    regards

    Hi,
    You can use version management functionality , which will give you record of changes with Reason as well as Text . This functionality will be applicable once you take print out of PO and after that you are doing any changes to PO.
    Spro - Materials Management -Purchasing -Version Management - Set Up Version Management for External Purchasing Documents  Activate Version management for your PO doc type and Pur Org
    Define Reasons for Change
    Set Up Change Displays
    Regards,
    Vikas

  • Oracle i Supplier Portal Workflows - Supplier Change Order Workflow

    Hi Friends,
    Oracle iSupplier Portal uses the following workflows:
    ■ Supplier Change Order Workflow
    ■ Update Capacity Workflow
    ■ Order Modifiers Workflow
    ■ Advance Shipment Notice (ASN) Workflow
    ■ Purchase Order Acknowledgement (handled by PO Approval Workflow)
    My problem is related to - 'Supplier Change Order workflow'
    I would like know is there are any changes in the work Flow - 'Supplier change order Work flow' in 11.5.10 to 11.5.8
    If yes,kindly list the changes.
    Thanks in advance!
    Thanks & Regards
    Dilip Nomula

    The best way to determine this would be to download the workflow into a wft file from 11.5.8 and 11.5.10 instances and run a simple Unix diff command on these two wft files. I do not believe you will find any documentation that will list differences at this level of detail.
    HTH
    Srini

  • Fragents and Change Orders

    I'm new to P3. I need to manage a large 2 year public
    works building construction schedule in downtown Los
    Angeles, with numerous and frequent changes to the
    schedule due to change orders, RFI's etc. Of course, these
    changes result in increases/decreases to cost and time,
    which need to be monitored and dealt with as part of the
    overall project. Some say that fragnets are the best way
    to insert these changes into the schedule. Some say
    fragnets are problematic. I have no experience with
    fragnets and I want to get off on the right foot. What
    have you project managers and project engineers found most
    effective for inserting and managing change order and RFI
    items?

    Nat:
    Thank you very much for
    your response.
    Your
    explanation of fragnets was very useful. I will make a
    point of saving and reusing repetitive groups of
    activities. In my case, SOMD (slab-on-metal-deck) is
    very repetitive. Also, exterior building finishes such
    as plaster (exterior sheathing, lath, scratch coat,
    brown coat, cure, finish coat, cleanup). Interior
    finishes activities are also often identical from
    floor to floor.
    The issue with
    RFI's is usually not so critical. I mentioned 1200
    RFI's but relatively few impact the schedule and must
    be coded in. But it is more than 48. In my case, the
    most common reason for entering an RFI into the
    schedule is when the
    consultant/Architect/Engineer/State Agency exceeds the
    contractually agreed upon time limit for response to a
    design-related RFI, or his response is irrelevant
    requiring a second round of RFI's to resolve the
    problem (revise and resubmit for title-block
    exceptions, for example, happens frequently). <br
    />
    It is easy to ignore these delays,
    and recording them in the schedule can really irritate
    the consultant, but when they become a habit, the
    cumulative impact on the schedule can be significant.
    Therefore, I need to be able to track these RFI delays
    effectively within the schedule. Of course, an RFI
    always has a number that is tracked inside Expedition
    as well.
    The bigger problem is
    Change Orders. As you know, when the Owner wants
    something added to the work, or a problem in the
    design results in an increase in the scope of work
    (there are many other possible reasons of course) a CO
    is requested. As a general rule, most change orders
    contain both a cost increase as well as a time
    extension. This time extension is the problem,
    because, especially on public works projects, the
    Owner/CM does not want to grant time an extension, and
    even when they do, they will only grant it when it
    impacts the critical path, and only after there is no
    float remaining (you will see why this distinction is
    important as you read further). The critical path
    condition makes sense, but the idea that my float is
    the Owner's to eat for his CO work is grating,
    especially when facing potential LD's. <br
    />
    To top it off, some Owners/CMs insist
    that all time delays be dealt with at the end of the
    project, when the actual time delay resulting from a
    CO can be calculated, instead of simply estimated, as
    is common practice (corresponding language is inserted
    into the CO to that effect instead of a defined time
    extension). My position is that if they refuse to
    grant a time extension based on an estimate, then the
    cost given in the CO, which is nothing more than an
    estimate, should also be replaced with T&M, and
    the budget be damned. Needless to say, that position
    has not won me many friends in the trailer across the
    way.
    You might suggest that we
    should refuse the extra work if a time extension is
    not granted up front. If we did that, they would hit
    our bond in a heartbeat. A contractor's lot in life
    seems to be to make lawyers (Deo volente, may the burn
    in hell) wealthy.
    In the case
    of the Owner/CM refusing to grant time for
    non-critical path CO's, my position is that, while the
    CO work may not be on the critical path this instant,
    in many cases, the critical path can change
    dramatically, sucking CO work into it that was
    previously separated from it by weeks. That very thing
    has happened on a school project located in a major
    city we are doing.
    The project
    has extensive tubular secondary steel at the exterior
    of the two buildings. This tube steel, ranging in size
    from 4" diameter to 20" diameter curves around, and up
    and down, the exterior of the structure. I do not
    exaggerate when I say that it is more complicated than
    a roller coaster. I will send pictures if you are
    interested. It supports curvilinear LG framing, which
    in turn supports a combination of plaster, brick
    veneer and metal panels. Very phantasmagorical stuff.
    Being a complicated 3-D arrangement of rigid steel,
    the architect's drawings were incomplete, (we should
    have expected that) and changed frequently (4 times)
    during fabrication, resulting in detailing problems
    and a two month delay in erection. Lots of unforeseen,
    fit-scribe-cut-repeat of long, heavy, curved, twisting
    pieces of long steel hanging from crane hooks has been
    required.
    We have recovered
    most of that time, but only by doing a great deal of
    out-of-sequence work.
    As you
    can imagine, this mess generated a ton of CO's, but
    the Owner would not agree to grant time extensions
    until the end of the project, and even then, only on
    CO's that are provably on the critical path. When
    combined with electrical changes impacting utility
    buildings, cable pulls, elevators, manlift and even
    exterior finishes, and then with added off-site work,
    topped off by submittal-review delays by State
    agencies, the critical path has flapped around like a
    flag in the wind, with CO's going in and out of it. In
    many cases, this means that a particular item of
    ongoing CO work has delayed the critical path for a
    period of time, but not for the entire duration of the
    CO work. So calculating the exact impact of the CO
    during the period it was on the critical path has not
    been easy.
    I anticipate there
    will be huge disagreement about these calculations at
    the end of the project when we have the "come to
    Jesus" time/money resolution meeting with the
    Owner/CM.
    BTW, the CM always
    insists that CO's be dealt with as fragnets, but that
    doesn't always make sense because the nature of CO
    work is often one-of-a kind, not repetitive stuff. But
    he has fragnets on the brain, it seems, so we call
    them fragnets to humor him.
    <br
    />Anyway, as you can imagine, tracking the dynamic
    (vs. static) effect of CO's on the schedule has been
    difficult. I am almost tempted to try calculus methods
    to calculate time consumed over time (if you get my
    meaning). Any experience analyzing schedules using
    differential equations? Someone must have done it
    before....
    Right now I am
    using activity codes to track them, but I am wondering
    if there is a better way.
    <br
    />
    I have other projects, without the
    same delays, but similar Owner/CM mindset regarding
    CO's
    Now you know the long
    story. Any suggestions?
    <br
    />Stan

Maybe you are looking for