Ora_hash - Same hash value for different inputs (Urgent)

Hi,
Trying to use ora_hash to join between tables but i noticed that in some cases, when working on different input value the ora_hash function generates same results.
select ora_hash('oomeroe03|6NU3|LS006P|7884|1|17-JUL-13 13.18.22.528000|0005043|'),ora_hash('GSAHFFXTK|GCQ3|A6253S|12765|1|17-JUL-13 17.26.26.853000|0136423|')
from dual
Output value : 1387341941
Oracle version is 11gR2.
Thanks

Why would anyone limit the hash distribution to three buckets ?
However, one must understand that the default seed is 0.  So one input repeated gets the same hash value unless the seed is changed.
SQL> select ora_hash(rn) , rn
  2  from
  3  (Select rownum as rn from dual connect by level < 11)
  4  order by rn;
ORA_HASH(RN)         RN
  2342552567          1
  2064090006          2
  2706503459          3
  3217185531          4
   365452098          5
  1021760792          6
   738226831          7
  3510633070          8
  1706589901          9
  1237562873         10
10 rows selected.
SQL> l
  1  select ora_hash(rn) , rn
  2  from
  3  (Select rownum as rn from dual connect by level < 11)
  4* order by rn
SQL> /
ORA_HASH(RN)         RN
  2342552567          1
  2064090006          2
  2706503459          3
  3217185531          4
   365452098          5
  1021760792          6
   738226831          7
  3510633070          8
  1706589901          9
  1237562873         10
10 rows selected.
SQL> /
ORA_HASH(RN)         RN
  2342552567          1
  2064090006          2
  2706503459          3
  3217185531          4
   365452098          5
  1021760792          6
   738226831          7
  3510633070          8
  1706589901          9
  1237562873         10
10 rows selected.
SQL>
Hemant K Chitale

Similar Messages

  • How can I run the report for different input values at the same time?

    Reports version: Report Builder 6.0.8.13.1
    Oracle version: Oracle8i Enterprise Edition Release 8.1.7.0.0
    I want to run the same report for different input parameter values and spool each o/p to different file and ftp to a server. For this, as a first step, I am spooling different input values in to a file, reading those values through a loop and calling the report for that input values. Each report run/execution is taking 15 minutes. Total report execution is taking approximately 4 hours (assuming 16 different input values) to complete. So I have to wait 4 hours to see ALL outputs.
    I would like to run the report parallel for ALL the input values and I should be able to see the ALL outputs with in 15 or 16 minutes.
    In my shell script, I added & symbol at the end of the report call to start/run the job in the background. Due to this the control passed to the next step after the report call. At this place I have an ftp command to send the output file to a different server and it is giving error some thing like “o/p file is not available/created yet". This is due to the fact that report writer is NOT yet completely started/initiated or it is NOT completed the spooling.
    How can I run the report at the same time for all the input values and save the time?
    Thanks in advance.
    Kishore.

    Increase the number of server engines running right now it seems there is only one engine running ,increase it to 4 or 6
    and then atleast 4 or 6 reports will run simultaneously.
    For FTPing the output add to your sript to check whether it is locked and if not then only try to ftp .
    Also for more better functionality read the document (chapter 15 ) for 10g reports for its new fuinctionality.
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/toc.htm
    Thanks
    Subodh

  • Execute BAPI for different input values and dispaly data in a table

    Hi all,
    I have a specific problem about executing BAPI multiple times for different input values and didplay result in a table.
    I am using the code similar to the following logic.
    Bapi_Mydata_Input in = new Bapi_Mydata_Input();
    wdContext.nodeBapi_Mydata_Input().bind(in);
    String in = wdContext.currentperdataElement.getnumber();
    in.setDestination_From(10)
    wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
    in.setDestination_From(20)
    wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
    in.setDestination_From(30)
    wdThis.wdGetMydataComponentController().executeBapi_Mydata_Input();
    And I want to display the data in a single table. I want the result in a table for Bapi execution based on input parameters passed 10,20 30.
    But I am getting the table data only for the input parameter 30.I mean its actually display the data in table only for the last input parameter.
    So May I ask you all if you know the solution for this problem.PLease advise me with some tips .or sample code is very much appreciated.I promise to award points to the right answer/nice advises.
    Regards
    Maruti
    Thank you in advance.

    Maruti,
    It seems that WDCopyService replaces content of node, rather then adds to content.
    Try this:
    Bapi_Persdata_Getdetailedlist_Input frelan_in = new Bapi_Persdata_Getdetailedlist_Input();
    wdContext.nodeBapi_Persdata_Getdetailedlist_Input().bind(frelan_in);
    final Collection personalData = new ArrayList();
    String fr1 = wdContext.currentE_Lfa1Element().getZzpernr1();
    frelan_in.setEmployeenumber(fr1);
    wdThis.wdGetFreLanReEngCompController().executeBapi_Persdata_Getdetailedlist_Input();
    WDCopyService.copyElements(wdContext.nodePersonaldata(), wdContext.nodeNewPersonaldata());
    for (int i = 0, c = wdContext.nodePersonaldata().size(); i < c; i++)
      personalData.add( wdContext.nodePersonaldata().getElementAt(i).model() );
    String fr2=wdContext.currentE_Lfa1Element().getZzpernr2();
    frelan_in.setEmployeenumber(fr2);
    wdThis.wdGetFreLanReEngCompController().executeBapi_Persdata_Getdetailedlist_Input();
    WDCopyService.copyElements(wdContext.nodePersonaldata(), wdContext.nodeNewPersonaldata());
    for (int i = 0, c = wdContext.nodePersonaldata().size(); i < c; i++)
      personalData.add( wdContext.nodePersonaldata().getElementAt(i).model() );
    wdContext.nodeNewPersonalData().bind( personalData );
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • How to use different default parameter value for different report subscriptions

    In ssrs is it possible to define different default parameter values for different subscriptions? In the following example I have a report which has two subscriptions with different start date and end date values:
    Report name – Testsubscription.rdl
    Subscription-1
    Input parameter (default values):
    start_date = first day of current Month
    end_date = till date
    Subscription-2
    Input parameter (default values):
    start_date = first day of current Quarter
    end_date = till date
    I know an alternative way of doing this would be to copy the rdl file with a different name but I am curious whether this can be done within a single report definition file. I am using SQL Server 2008 R2 Standard Edition.
    Thanks!
    spp

    Hi sppdba,
    As per my understanding, there is a report with two parameter: start_date and end_date, you want to configure subscription for the report, and set different default values for start date and end date. And you want to know if it is possible to achieve you
    goal by using a single report definition file.
    Since you are using SQL Server 2008 R2 Standard Edition, we need to achieve your goal by configuring two subscriptions for the report. For detail information, please refer to the following steps:
      1. In design surface, right click start_date and open Parameter Properties dialog box.
      2. In General pane, type Name and Prompt, set Data Type to Date/Time.
      3. Click Available Values in left pane, select Specify Values.
      4. Click Add button, in Label text box, type “First day of Current Month”, click (fx) button in Value section, then type the expression like below:
    =DateSerial(Year(Now()), Month(Now()), 1)
      5. Click Add button, in Label text box, type “First day of Current Quarter”, click (fx) button in Value section, then type the expression like below, then click OK.
    =DateSerial(Year(Now()), (3*DatePart("q",Now()))-2, 1)
      6. Right click end_date and open Parameter Properties dialog box.
      7. In Available Values pane, select Specify Values.
      8. Click Add button, in Label text box, type “Today”, click (fx) button in Value section, then type the expression =Today(), then click OK.
    Now that the parameters are created, we need to configure subscription for the report. For detail information, please follow these steps:
      1. Open Report Manager, and locate the report for which you want to create a new subscription.
      2. Hover over the report, and click the drop-down arrow.
      3. In the drop-down menu, click Manage. This opens the General properties page for the report.
      4. Select the Subscriptions tab, and then click New Subscription.
      5. Select the delivery extension and data source for the subscription.
      6. Select a method of delivery, then choose report delivery options.
      7. Specify conditions that cause the subscription to process and delivery to occur.
      8. Set start_date to First day of Current Month, end_date to Today, then click OK.
      9. Create a new subscription as step4 to 7, set start_date to First day of Current Quarter, end_date to Today, then click OK.
    The following screenshots are for your reference:
    For detail information about Creating Standard Subscriptions, please refer to the following document:
    http://msdn.microsoft.com/en-us/data/ms156307(v=sql.105)
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • Customisation for PO Release (different Values for different Doc Types)

    Dear Experts,
    I need to configure for PO release procedure where in the Characteristics would be Plant (2 Plants), Doc Type (3 types - Standard PO, Imports PO & Capital PO) and Value (2 stage release: 0-100000 & >100000 INR for Std PO, 0-200000 & >200000 INR for Imports PO and 0-300000 & >300000 INR for Capital PO).
    Please let me know where I shoud define the different Values for different Docs for the Release procedure to work properly.
    Or let me know the entire procedure for achieving the same.
    Regards,
    MNP

    Hi MNP,
    You have to create different CLASSes in IMG with the possible combination of different characteristics,
    EX. CLASS EKKO11 - Plant A, Doc type- Std PO, Value- 0-100000 & >100000 INR
          CLASS EKKO22-  Plant A, Doc type- Import PO, Value-  0-200000 & >200000 INR
          CLASS EKKO33-  Plant A, Doc type- Capital PO, Value-  0-300000 & >300000 INR  and same for other plant
    then assign these classes to the respective Release group.
    regards,
    Pravin

  • Can we use same number range for different  fields

    can we use same number range for different  fields. how can we see the number range defined for a particular field

    Hai,
    Yes you can have same number range for different fields  by using the same domain to the data elements that are user to your two fields.
    To see the range:
    Go to SE11,Type table Name open it-->double click on the DataElement adjasent to the field name ,You will get Domian ,Double click on Domain You will get Domain.There See Value range option .Value range cam also be defined by Value Table which will also at the Doamin level.
    <b>Reward points if it helps you.</b>
    Regds,
    Rama.Pammi

  • Can i use the same email address for different users?

    we are a small department with one email address, can i use the same email address for different users?

    No. Each user needs to have his unique ID.
    Mylenium

  • Is it possible to have same file size for different dpi?

    I changed one.TIFF file (300dpi, 1024X1332)  to .jpg files of four different dpi. But when I checked the four result jpg files, I found out that they are all in same file size and quality.( I also have checked the property of the files in the Windows.)
    I think more DPI means more data and more file size. Am I wrong?
    I use Photoshop CS 5.1(64bit, WINDOWS) - which is part of my Adobe Master Collection CS5.5.
    TIFF(300dpi, 1024X1332) ->
    1. JPG(72dpi, 1024X1332) : 306KB
    2. JPG(108dpi, 1024X1332) : 306KB
    3. JPG(144dpi, 1024X1332) : 306KB
    4. JPG(600dpi, 1024X1332) : 306KB
    I tested a few times more with different files. and same result comes out.(same file size for different dpi)
    Thanks in advance.

    Yes absolutely. Great observation.  PPI does not control the number of pixels, just how big they are.
    Now, if you change the PPI in the Image Size dialog with Resample checked.. then, that is a different story. In that case you will be changing the pixel dimension of an image (i.e.,changing the total number of pixels making up the image) while keeping its print size.
    In your test files, you will notice all the print sizes are different, because all you were telling Photoshop to do was change the size of the pixels (if or when the image is ever printed), which is really just a bit of metadata of the file.

  • Same preparedstatement object for different queries.. ?

    Actually I m getting same preparedstatement object for many queries in a for loop..In this scenario its not working properly..Suppose like dis..
    connection con.setAutoCommit(false);
    PreparedStatement prepStmt = con.prepareStatement(
    "UPDATE DEPT SET MGRNO=? WHERE DEPTNO=?");
    prepStmt.setString(1,mgrnum1);
    prepStmt.setString(2,deptnum1);
    prepStmt.addBatch();
    PreparedStatement prepStmt = con.prepareStatement(
    "UPDATE EMP SET EMPNO=? WHERE DEPTNO=?");
    prepStmt.setString(1,empno1);
    prepStmt.setString(2,deptnum2);
    prepStmt.addBatch();
    Whether we can take same preparedstatement object for different query..??Its not giving any error but its not updating all the records but only the last one...
    Any solution..

    kriti123 wrote:
    Actually I m getting same preparedstatement object for many queries in a for loop..In this scenario its not working properly..Suppose like dis..
    Ignore all of the above.
    You are using a batch.
    There is a specific idiom for that. You create the statement once and then keep calling the appropriate methods on it to load and then execute the batch, and check errors.
    When done you close it. If you need commit you are going to need to deal in blocks.
    If you have a large volume of data then database import tools are very likely to be substantially faster.

  • Create hash value for clob column ?

    Hi,
    does anybody know a way to calculate a hash value for a clob column (9i) ?
    DBMS_UTILITY.GET_HASH_VALUE could only handle varchar2(4000).
    Thank you!
    Regrads
    Michael
    Message was edited by:
    mseiwert

    I can't reproduce it on my 10.2.0.4.0. CTL file:
    load data
    INFILE *
    Replace into table samp
    fields terminated by ","
    trailing nullcols
    no,
    col1 Char(100000000) ,
    col2 Char(100000000) enclosed by '"' and '"'
    BEGINDATA
    1,asdf,"assasadsdsdsd""sfasdfadf""sdsdsa,ssfsf"
    2,sfjass,"dksadk,kd,ss""dfdfjkdjfdk""sasfjaslaljs"Loading:
    SQL> Create table samp
      2  (
      3  no number,
      4  col1 clob,
      5  col2 clob
      6  );
    Table created.
    SQL> host sqlldr scott/tiger control=c:\temp\samp.ctl log=c:\temp\samp.log
    SQL> select * from samp
      2  /
            NO
    COL1
    COL2
             1
    asdf
    assasadsdsdsd"sfasdfadf"sdsdsa,ssfsf
             2
    sfjass
    dksadk,kd,ss"dfdfjkdjfdk"sasfjaslaljs
            NO
    COL1
    COL2
    SQL> SY.

  • Generating MD5 hash value for any specific flat file

    Hi experts,
    I am developing a program that will generate flat files and also I should generate the MD5 Hash value for each and every flat files. My question is how can I generate the MD5 hash value for the generated .txt files.
    Thanks in advance
    Shabir

    You can use functions
    MD5_CALCULATE_HASH_FOR_CHAR for text file
    MD5_CALCULATE_HASH_FOR_RAW for binary

  • Content Conversion- Same keyfield value for two different sub structure

    Hi,
    I have a scenario where the key field value for the 2 substructure of record structure is same.
    MY XML structure is like this :
    <documentName>
       <recordset>
    <Header>
        <field-nameA1>
        <field-nameA2>
        <field-nameA3>
    <ITM1>
       <field-nameB1>
       <field-nameB2>
       <field-nameB3>
    <ROW1>
       <field-nameB1>
       <field-nameB2>
       <field-nameB3>
    <ITM2>
       <field-nameB1>
       <field-nameB2>
       <field-nameB3>
    <ROW2>
       <field-nameB1>
       <field-nameB2>
       <field-nameB3>
    The sample text file is given below where line no. 3 and 5 are different substructure(For ROW1 and ROW2 respectively) with same keyfield value.
    "HDR",399,"file",20050302,100642,3289
    "ITM1",2,3,4,5,6,7,8,9,10
    "ROW",3,4,5,6
    "ITM2",2,3,4,5,6,7,8,9,10
    "ROW",7,8,9,10
    After content conversion I get a XML structure in which there is no ROW2 and all data within the fields of ROW2 are put under ROW1 as the key field values are identical.
    In the records only the first field is constant (e.g. ROW).
    How to handle such a scenario?
    Regards
    Satish Chauhan

    Unless you can somehow expand the key, I don't know that this is possible.  The key implies uniqueness - and in your case, unfortunately, it isn't.  Is there any way to edit the structure to make it more unique for you?  Do you have any control or ability to change that?
    Maybe if you add unique keys in your mapping, you can strip them off with content conversion on the way out using the parameter keyFieldInStructure=ignore?

  • Different execution plan for same query but for different condition value

    Hi All,
    I'm facing a strange situation where same query for different condition not working.
    1--
    Select  top 10 * from revenuefact(nolock) 
    where feecode ='OW4'
    2--
    Select  top 10 * from revenuefact(nolock)
    where feecode ='BTE'
    1st query is returning result easily but 2nd query is taking too long. Column
    feecode has already Non-clustered index and Clustered index is also available for another col RevenueSID.
    I was surprised when checked the query execution plan for both the above queries  which is quite different (as per attached below). Can anyone suggest me the reason behind it.
    And solution for the same. One more thing that data for feecode BTE is inserting through different source instead of others feecode and table contains more than 300 million rows.

    When I speak with people inside Microsoft who work with the optimizer, the refuse to accept the work "bug" when a query produces the correct result, but with a suboptimal plan. They prefer to use the word "limitation".
    The limitation here is that when the optimizer compares two plans, it only looks at the estimated cost. As far as I know, it does not perform any analysis from the perspective "what if the statistics are wrong"? They do provide the hint OPTIMIZE
    FOR UNKNOWN, but that does not work then there is a constant as in this case.
    The optimizer will surely distinguish between TOP 10 and TOP 10000000. With the latter, you have all reason to expect a Clustered Index Scan no matter which value you search for - unless you pick a value for which the histogram indicates that there are no
    rows.
    Interesting enough, I was able to reproduce the situation in my Northgale database, which is an inflated version of Northwind, and where statistics should be accurate.
    SELECT TOP 10 * FROM Orders WHERE EmployeeID = 8
    results in a CI scan, and so does also EmployeeID = 7, and even 5. There are only 2292 rows out of a total of 344305 rows. If I try EmployeeID 808 for which there are 1797, the optimizer goes for the index seek.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Message-Mapping: Use same RFC lookup for different target fields

    Hello,
    I need to apply an RFC Lookup which delivers a boolean flag back (true or false). This RFC lookup should be used for different target fields.
    Is there a way to execute the RFC lookup just once and then store the result in an internediate variable that I can use for all futher checks for different target fields?
    If this is not possible and I have to apply the RFC lookup for all necessary target fields is it then executed for each target field ? This is exactly what I want to avoid in order not to slow down performance.
    The input parameter (=source field value) would be the same.
    Thank you for your advice!

    Exactly.
    Here is a UDF example I have that you could adapt to your needs.
    Set
    public String setCounter(String a,String b,Container container){
    /* Store values in global datacontainer
    a: mapping value and return valueparameter
    b: name for stored value parameter
    GlobalContainer myGlobalContainer;
    myGlobalContainer = container.getGlobalContainer();
    myGlobalContainer.setParameter(b.toUpperCase(), a);
    return a;
    Get
    public String getCounter(String a,Container container){
       //write your code here
    GlobalContainer gc = container.getGlobalContainer();
    if (gc.getParameter(a) != null) {
      return String.valueOf(gc.getParameter(a));
    } else {
    return "1";

  • Plan hash value for two queries!

    Hi,
    DB : Oracle 11g (11.2.0.3.0)
    OS: RHEL 5
    I have two question:
    1. Can two queries have same plan hash value? I mean I have below two queries:
    SELECT /+ NO_MERGE */ MIN(payor.next_review_date)*
    * FROM payor*
    * WHERE payor.review_complete = 0*
    * AND payor.closing_date IS NULL*
    * AND payor.patient_key = 10;*
    and
    SELECT  MIN(payor.next_review_date)
    * FROM payor*
    * WHERE payor.review_complete = 0*
    * AND payor.closing_date IS NULL*
    * AND payor.patient_key = 10;*
    When I tried to review the execution plan for both queries, the plan hash value remain same. Does it mean that execution plan for both queries are same? If yes, then how Oracle understands or changes the execution plan based on hint. If no then what plan hash value represents?
    2. If the execution plan with hint and without hint is same except for a given query except no.of rows and bytes. Does it mean that query with less rows and bytes scanned is better?
    Thanks in advance
    -Onkar

    Hi,
    there are two different things. One is EXPLAIN PLAN, which is how the optimizer thinks the query will be executed. It contains some estimates of cost, cardinalities etc. There is also EXECUTION PLAN. It also contains all this information regarding the optimizer estimates, but on the top of that, it also contains information about actual I/O incurred, actual cardinalities, actual timings etc.
    So if a hint is changing optimizer estimates, but the plan stays the same, then impact on query's performance is zero.
    If the actual numbers are changing, this is probably also irrelevant to the hint (e.g. you can have less physical reads because more blocks are found in the buffer cache the second time you're running the query, or you less work because you don't have to parse the statement etc.).
    Actually, most of optimizer hints don't affect optimizer estimates; rather, they try to get the optimizer to use a certain access method or a certain join order etc. regardless of the cost. So you must be talking about such hints as cardinality, dynamic_sampling etc. If that's not the case -- please clarify, because this means that something wrong is going on here (e.g. an INDEX hint may work or it may fail to work, but if it fails, optimizer estimates shouldn't change).
    Best regards,
    Nikolay

Maybe you are looking for

  • Value Mapping not in cache

    Hi all, I've ceated a value mapping table manually in the IB (Config) using the tool. I also created a VM Group. However it is not picking up the new values and I can't find the VMG in the RWB Cache either.... Im only dealing with small number of ent

  • Variable power supply not working in virtual elvis

    When i make a virtual elvis 3d schematic i cannot get any output from the variable power source, i have played with it alot and still no output. please help.

  • Checklist for Interface development

    Hi All, We have implementation project ,PI 7.1 integration with all modules(SAP HCM,PP,SD,QM,PS,MM,PP,FICO,SRM,ECC,MDM). We have interface for mostly all modules in SAP PI. Can you provide few Checklists that we can use for PI 7.1 interfaces during d

  • Result in attributes

    Hello, I just installed the Oracle 9iAS v. 1.0.2.2.0 and the newest (beta) XDK. Now some of my XSQL-pages don't work anymore. I have the problem isolated to queries like (SELECT COUNT(*) FROM test) AS "@total" I get an oracle.xml.sql.OracleXMLSQLExce

  • Limiting childs ipad usage

    My son sneaks his ipad at night and watches tv or looks at you tube videos for hours when he is supposed to be sleeping.  Is there a way to limit the wifi capabilities to prevent this from happening?  Turning off the wifi and going to airport mode do