Tablespace design for joined tables

Hello altogether,
Right now I'm designing the database structure for an application requiring high performance on database side.
While thinking about the tablespace structure I came to the following question:
When I am sure that I will have a join on two (or more) tables very often, is it better to put them in one tablespace, or is it better to put them into different tablespaces?
Thanks for your help!
Daniel

The tablespace that any particular object is in is irrelevant from a performance standpoint (assuming the tablespace parameters are identical, of course. An object in a dictionary managed tablespace may well have different performance characteristics than an object in a locally managed tablespace using ASSM). Now, if different tablespaces have data files on different physical devices, you may see some performance gains from putting different objects into different tablespaces simply because this would tend to distribute I/O over more physical devices. Of course, you could accomplish the same thing by creating data files on different devices in the same tablespace. And with newer disk subsystems, this sort of manual load balancing tends to be rather pointless.
If you have locally attached storage and you want to distribute I/O across devices by putting objects in different tablespaces rather than assigning multiple data files to the same tablespace, it generally isn't going to matter much which objects are in which tablespace so long as the I/O is relatively evenly distributed (and assuming that there aren't any I/O patterns that need to be accounted for (i.e. if object A is used heavily during the day and object B is used heavily at night and those are the only two objects in the database, putting them in different tablespaces is pointless because you'd never be using the extra spindles simultaneously). You'd have just as much luck putting objects that start with the letters A-L in one tablespace and M-Z in another as putting tables and indexes in different tablespaces or putting related objects in the same tablespace or putting related objects in different tablespaces. So long as I/O gets distributed, it doesn't matter which objects are where.
Personally, I'd never have separate tablespaces for performance. Much easier to have a single tablespace with multiple data files on different devices. Multiple tablespaces should exist for managability reasons, recoverability reasons, and because different objects require different tablespace settings.
Justin

Similar Messages

  • Sql statement for join tables

    hi there..i need ur helps
    Here are my tables n column name for each tables
    a) rep_arrngt
    Name
    REP_ARRNGT_ID
    REP_ARRNGT_DESC
    REP_ARRNGT_TYPE
    ACCT_CAT
    DEF_INDUSTRY_CODE
    MEDIA_ID
    LANGUAGE_ID
    CURRENCY
    PAGE_ID
    b) bci_rep_arrng
    Name
    REP_ARRNGT_ID
    BCI
    SUB_SUM_CODE
    DP_SUB_SUM_CODE
    c) acct_rep_arrngt_link
    Name
    ACCT_NO
    REP_ARRNGT_ID
    DOC_TYPE
    LAST_BILL_DATE
    BILL_FREQUENCY
    SCALING
    EFF_FROM_DATE
    EFF_TO_DATE
    MEDIA_ID
    Actually, i want to get the unique value for sub_sum_code according to the bci..
    i already use join tables n here is my sql statement :
    SELECT T1.SUB_SUM_CODE,T1.BCI,T1.REP_ARRNGT_ID,T2.REP_ARRNGT_ID,T3.REP_ARRNGT_ID FROM BCI_REP_ARRNG T1, REP_ARRNGT T2, ACCT_REP_ARRNGT_LINK T3 WHERE T1.REP_ARRNGT_ID=T2.REP_ARRNGT_ID AND T2.REP_ARRNGT_ID=T3.REP_ARRNGT_ID AND BCI='TTA00F06'
    n my results is :
    SUB_SUM_CODE BCI REP_ARRNGT_ID
    TBGSR TTA00F06 R1
    TBGSR TTA00F06 R1
    TBGSR TTA00F06 R1
    TBGSR TTA00F06 R1
    I get the repeated results for sub_sum_code..
    so, what i need to do if i want only 1 row results like this :
    [u]SUB_SUM_CODE BCI REP_ARRNGT_ID
    TBGSR TTA00F06 R1
    i try to use group by, but i get the error..plz help me

    If you only want "to get the unique value for sub_sum_code according to the bci" then why are you joining the tables in the first place? Not knowing PKs etc you could just use DISTINCT in your select statement.
    SELECT DISTINCT T1.SUB_SUM_CODE,
                    T1.BCI
    FROM BCI_REP_ARRNG T1
    AND BCI='TTA00F06'

  • Rules for joining tables in SQVI

    Hi all,
    I'm new to this community and this is my first time when i post on this forum. Hope I didn't post or did anything to bad.
    I just want to know how can I know which tables should I join. I'm trying to create a report that shows me all the open items from a GL account (Construction In Progress) and have beside the AUC the AUC description, order, PO, Vendor, vendor name, plant, material (at least).
    I tried to join BSIS and ANLA for starters, but anything I select it just gives me the same error "No data was selected" Is there any rule like only the key should be selected as selection fields, anything that you could advise would be a blessing.
    Thank you
    Edited by: Viorel_Petre on Jan 18, 2011 10:52 AM

    Hi,
    Welcome to SDN!!!
    Since you are new to SAP.
    you should ask the functional consultant to provide you with the names of the tables and fields.
    the transaction SQVI is used to create queries and you can also use it to know relation bewetween tables for appplying join conditions.
    for join conditions.
    1. create  VIEW.
    2. Choose data source as table join.
    3. insert 2 tables so see the realation between them.
    search google/SDN for more information.

  • Get double return for join table

    Dear Experts:
    SELECT eban~banfn      "PR number
             eban~bnfpo      "PR item
             eban~bsart      "Doc Type
             eban~bednr      "Requistion tracking number
             eban~ebeln
             eban~ebelp
             eban~zzloc      "GEO code
             ztmm_ccp~zzclli "zzclli code
      INTO CORRESPONDING FIELDS OF TABLE gi_pr_extract
      FROM  ( eban
             INNER JOIN ztmm_ccp
                    ON  eban~bednr = ztmm_ccp~bednr
                   AND  eban~ebeln = ztmm_ccp~ebeln
                   AND  eban~ebelp = ztmm_ccp~ebelp )
      WHERE eban~bsart IN s_bsart.  "11 input doc type
    The s_bsart are:
    NB
    UB
    ZNB
    ZSC
    ZUC
    ZVC
    ZXC
    ZZO
    ZZX
    ZZY
    ZZZ
    From above SQL, I got double returen for each  ebanbanfn  and ebanbnfpo
    Row     BANFN     BNFPO     BSART     BEDNR     ZZLOC     ZZCLLI
    1      3100000056     00010     NB               
    2      3100000056     00010     NB               CLLICD DRTP
    3      3100000057     00010     NB               
    4      3100000057     00010     NB               CLLICD DRTP
    5      3100000058     00010     NB               
    6      3100000058     00010     NB               CLLICD DRTP
    7      3100000061     00010     NB               
    8      3100000061     00010     NB               CLLICD DRTP
    9      3100000062     00010     NB               
    10      3100000062     00010     NB               CLLICD DRTP
    Do you know why and how do I get the unique one?
    Thank you very much!
    Helen
    Edited by: Thomas Zloch on Oct 4, 2010 3:49 PM - please use code tags

    Hi Helen,
    Please check with the below code snippet. Hope it will work.
    SELECT eban~banfn     
              eban~bnfpo    
              eban~bsart     
              eban~bednr    
              eban~ebeln
              eban~ebelp
              eban~zzloc     
              ztmm_ccp~zzclli
       INTO CORRESPONDING FIELDS OF TABLE gi_pr_extract
       FROM  eban
              INNER JOIN ztmm_ccp
                      ON    ztmm_ccp~bednr = eban~bednr
                    AND  ztmm_ccp~ebeln = eban~ebeln
                    AND  ztmm_ccp~ebelp = eban~ebelp
       WHERE eban~bsart IN s_bsart.
    Thanks
    Nitesh

  • MDM Data model design for Main table visa vis lookup table

    Hi ,
    I would like to know whether the legal entities or Address table which are common for all MDM main tables like Customer ,Vendor,Material,Business Partner etc can also become a main table when their attributes are around 30-40 range.
    Is it a sound design approach to make Company table with about 50 attributes and say address table with 20 attributes as Main table and replicate a small company-id table with 2 or 3 attributes to link to the main table(company)? This will ensure replicating that small table(company-id) to all other Main tables(customer,vendor,......) instead of replicating that big company table as lookup for all main tables?
    Thanks in advance for any idea or feasibility comments.
    -reo

    Hi, Deepak
    >>> - How can I populate the data in the lookup table at the same time when I am populating the main table ? I have only the XML's that correspond to the main table . I don't have seperate data for the lookup tables .
    I don't think you can populate both main table and all fields of lookup tables at the same time, i.e. using same map. You can consider 2 options to upload all information you have:
    1) If your XML file contains data you would like to upload to lookup tables, you can upload it to MDM lookup tables with several maps using same XML and choosing different sections of that XML corresponding to different MDM lookup tables.
    2) Also you can upload main table simultaneously with lookup table entries (using same map), but in this case new lookup table entries will only contain display field values that you mapped. To do this you should use 'Add' value mapping functionality for fields that you mapped to lookup tables.
    >>>- Can I use the standard maps available for import in the business content of material repository in MDM ?
    1) In case you have material master repository delivered by SAP and you use XML files which structure corresponds to SAP predelivered XSD schemas then you can use these maps undoubtedly.
    2) If your repository is based on SAP predelivered, but you changed it ,you should adjust these maps due to differences in repository structure and  XML files structure.
    3) If you created your repository from scratch you should consider option of making your own import maps.
    Regards,
    Vadim Kalabin

  • Create Keys for joining tables

    Can I create a data element for a given table that can be used as a joining utility data item for extracting data from two or more tables?
    I have a business area with tables that are basically non-relational because of the absence of data elements that are of common name or meaning.

    Hi,
    it will be better if we can have the table structure, depending upon what information we have and there is no join condition between different table you could try with UNION.
    --untested
    CREATE VIEW VW_TEST AS
    select SERIAL_NUMBER , TABLE_NAME FROM table1
    UNION ALL
    select SERIAL_NUMBER , TABLE_NAME
    UNION ALL
    select SERIAL_NUMBER , TABLE_NAME
    thanks

  • SQL for join table  problem?

    hi morning,
    my problem also haven find out the solution,can help me solve.
    I got one part of register student to exam,during that part is like that.
    Student Code:________(table3)
    Exam Code:_________(table 3)
    Student Name:________(table 1)
    Exam Name:_________(table 2)
    I can write code call table 3 but when three table join together in part 3,got problem is come out alry....The problem is inside the Student Name & Exam Name.When i use the button for NEXTRECORD to check record,cannot call the student Name & exam Name.
    Thank for help. Because i use sql code to call table 3 to check table1 and table 2 detail ,then retrive that data.
    my code is like that,
    private void cmd_NexRec_RSEActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    int i;
    i=0;
    try{
    String x1,x2;
    x1=(jTextField10.getText()).trim();
    x2=(jTextField11.getText()).trim();
    if (x1.equals("")&& x2.equals("") )
    counter.studentExam="R";
    counter.registerStudentExam="N";
    i++;
    jInternalFrame8.setVisible(false);
    Connection con = getConnection2();
    Statement s = con.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs=getStudentExams();
    ResultSet rs1=getCodes();
    ResultSet rs2=getExams();
    String select="select * from studentExamFile a LEFT JOIN {studentData b} ON a.student_code=b.student_code LEFT JOIN {exam c} ON c.exam_code=a.exam_code where student_code='"+ x1 +"' and exam_code='"+ x2 +"'" ;
    // String select ="select * from studentExamFile , exam , studentData where studentExamFile.student_code=studentData.student_code and exam.exam_code=studentExamFile.exam_code ";
    // rs = s.executeQuery(select);
    rs.next();
    StudentExam c=getstudentcode(rs);
    Code c1=getCode(rs1);
    Examcode c2=getexamcode(rs2);
    jTextField12.setText(c.studentcode);
    jTextField13.setText(c.examcode);
    jTextField14.setText(rs.getString("c1.name"));
    jTextField15.setText(rs.getString("c2.ename"));
    // jTextField14.setText(c1.name);
    // jTextField14.setText(c2.ename);
    jLabel16.setText("Record: Review");
    jInternalFrame10.setVisible(true);
    jTextField12.setEnabled(false);
    jTextField13.setEnabled(false);
    //New Line
    jTextField14.requestFocus();
    else
    Connection con = getConnection2();
    Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    String w=(jTextField10.getText()).trim();
    String w2=(jTextField11.getText()).trim();
    //String select= "select * from [studentExamFile] where [student_code]>'" w "'";
    // String select1="select * from [studentExamFile] where [exam_code]>'" w2 "'";
    String select="select * from studentExamFile a LEFT JOIN {studentData b} ON a.student_code=b.student_code LEFT JOIN {exam c} ON c.exam_code=a.exam_code where student_code='"+ x1 +"' and exam_code='"+ x2 +"'" ;
    ResultSet rs;
    rs = s.executeQuery(select);
    // rs = s.executeQuery(select1);
    rs.next();
    if(rs.isFirst())
    counter.registerStudentExam="N";
    jInternalFrame8.setVisible(false);
    jTextField12.setText(rs.getString(1));
    jTextField13.setText(rs.getString(2));
    jLabel16.setText("Record: Review");
    jInternalFrame10.setVisible(true);
    jTextField12.setEnabled(false);
    jTextField13.setEnabled(false);
    //New Line
    jTextField14.requestFocus();
    counter.studentExam="R";
    else
    JOptionPane.showMessageDialog(this,"End of the file ","Infomation",JOptionPane.INFORMATION_MESSAGE);
    }catch(SQLException e)
    System.out.println("Error");
    //jTextField3.requestFocus();
    }

    thanks for reply.
    i think my problem is in connection to database .
    String sql="select studentData.student_name, exam.exam_name from studentData,exam,studentExamFile where studentData.student_code=studentExamFile.student_code and exam.exam_code=studentExamFile.exam_code ";
                    // String sql="select studentData.student_name , exam.exam_name from studentExamFile  LEFT JOIN { studentData }  ON studentExamFile.student_code=studentData.student_code LEFT JOIN { exam }  ON exam.exam_code=studentExamFile.exam_code ";
                     Connection con = getConnection();
                     Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                     Connection con2 = getConnection();
                     Statement s3 = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
                     System.out.println("error");//my problem inside here....help me
                     rs3=s.executeQuery(sql);
                     rs3=s3.executeQuery(sql);
                     rs3.next();
                     String s1,s2;
                     s1=rs3.getString(1);//maybe me dunno how to convert the sql data...
                     s2=rs3.getString(2);
                     rs.next();
                     rs2.next();
                    // rs3.next();
                     Code c=getCode(rs);
                     Examcode c2=getexamcode(rs2);
                     StudentExam c3=getstudentcode(rs3);
                     jTextField12.setText(c3.studentcode);
                     jTextField13.setText(c3.examcode);
                    // jTextField14.setText(rs.getString("c.name")); 
                     //jTextField15.setText(rs.getString("c2.ename"));
                     jTextField14.setText(s1); 
                     jTextField15.setText(s2);
                     jLabel16.setText("Record: Review");
                     jInternalFrame10.setVisible(true);
                     jTextField12.setEnabled(false);
                     //New Line
                     jTextField14.requestFocus();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SQL query for join table and multiple values

    Trying to join two tables , Emphours and EmpStatus to get
    result which gives each emplyees hour 
    worked each day
    in past  say 1 year in what status. I need result similar to table 3 , Hours Can also be grouped per week
    all I need Is Each employees hours in each week and his status and position at that time if possible
    any help will be highly appreciated. Thank you 
    note: payday is every other Friday- week runs from Saturday through Friday
    EmpStatus Table tracks when employees status changed
    EmpHours
    employee
    workday
    payday
    hours
    position
    101
    1/1/2014
    1/3/2014
    8
    assistant
    101
    1/3/2014
    1/3/2014
    8
    assistant
    101
    1/4/2014
    1/17/2014
    8
    assistant
    101
    1/5/2014
    1/17/2014
    8
    assistant
    101
    1/7/2014
    1/17/2014
    8
    assistant
    101
    1/8/2014
    1/17/2014
    8
    assistant
    101
    1/9/2014
    1/17/2014
    8
    assistant
    101
    1/11/2014
    1/17/2014
    8
    assistant
    101
    1/13/2014
    1/17/2014
    8
    assistant
    101
    1/14/2014
    1/17/2014
    8
    assistant
    101
    1/18/2014
    2/14/2014
    8
    assistant
    102
    1/1/2014
    1/3/2014
    7
    manager
    102
    1/25/2014
    1/31/2014
    7
    manager
    102
    1/26/2014
    1/31/2014
    7
    manager
    102
    1/28/2014
    1/31/2014
    7
    manager
    102
    1/31/2014
    1/31/2014
    7
    manager
    103
    1/1/2014
    1/3/2014
    5
    intern
    103
    1/31/2014
    1/31/2014
    6
    intern
    104
    1/14/2014
    1/17/2014
    5
    supervisor
    104
    1/30/2014
    1/31/2014
    6
    supervisor
    EmpStatus
    employee
    start_date
    status
    101
    1/1/2014
    parttime
    101
    1/18/2014
    fulltime
    102
    1/1/2014
    seasonal
    102
    1/18/2014
    fulltime
    103
    1/1/2014
    partime
    103
    1/18/2014
    fulltime
    104
    1/4/2014
    parttime
    104
    1/18/2014
    fulltime
    Table 3
    employee
    status
    hours
    position
    workday
    weekend
    payday
    101
    parttime
    8
    assistant
    1/1/2014
    1/3/2014
    1/3/2014
    101
    parttime
    8
    assistant
    1/3/2014
    1/3/2014
    1/3/2014
    101
    parttime
    8
    assistant
    1/4/2014
    1/10/2014
    1/17/2014
    101
    parttime
    8
    assistant
    1/5/2014
    1/10/2014
    1/17/2014
    101
    parttime
    8
    assistant
    1/7/2014
    1/10/2014
    1/17/2014
    101
    parttime
    8
    assistant
    1/8/2014
    1/10/2014
    1/17/2014
    101
    parttime
    8
    assistant
    1/9/2014
    1/10/2014
    1/17/2014
    101
    parttime
    8
    assistant
    1/11/2014
    1/17/2014
    1/17/2014
    101
    parttime
    8
    assistant
    1/13/2014
    1/17/2014
    1/17/2014
    101
    parttime
    8
    assistant
    1/14/2014
    1/17/2014
    1/17/2014
    101
    fulltime
    8
    assistant
    1/18/2014
    1/24/2014
    2/14/2014
    102
    seasonal
    7
    manager
    1/1/2014
    1/3/2014
    1/3/2014
    102
    fulltime
    7
    manager
    1/25/2014
    1/25/2014
    2/14/2014
    102
    fulltime
    7
    manager
    1/26/2014
    1/26/2014
    2/14/2014
    102
    fulltime
    7
    manager
    1/28/2014
    1/28/2014
    2/14/2014
    102
    fulltime
    7
    manager
    1/31/2014
    1/31/2014
    2/14/2014
    103
    parttime
    5
    intern
    1/1/2014
    1/3/2014
    1/3/2014
    103
    fulltime
    6
    intern
    1/31/2014
    1/31/2014
    2/14/2014
    104
    parttime
    5
    supervisor
    1/14/2014
    1/17/2014
    1/17/2014
    104
    fulltime
    6
    supervisor
    1/30/2014
    1/31/2014
    1/31/2014

    Hello David,
    Try this query
    set dateformat mdy;
    declare @EmpHours table
    (Employee int,workday date,payday date,hours int,position varchar(50));
    insert into @EmpHours values
    (101,'1/1/2014','1/3/2014',8,'assistant'),
    (101,'1/3/2014','1/3/2014',8,'assistant'),
    (101,'1/4/2014','1/17/2014',8,'assistant'),
    (101,'1/5/2014','1/17/2014',8,'assistant'),
    (101,'1/7/2014','1/17/2014',8,'assistant'),
    (101,'1/8/2014','1/17/2014',8,'assistant'),
    (101,'1/9/2014','1/17/2014',8,'assistant'),
    (101,'1/11/2014','1/17/2014',8,'assistant'),
    (101,'1/13/2014','1/17/2014',8,'assistant'),
    (101,'1/14/2014','1/17/2014',8,'assistant'),
    (101,'1/18/2014','2/14/2014',8,'assistant'),
    (102,'1/1/2014','1/3/2014',7,'manager'),
    (102,'1/25/2014','1/31/2014',7,'manager'),
    (102,'1/26/2014','1/31/2014',7,'manager'),
    (102,'1/28/2014','1/31/2014',7,'manager'),
    (102,'1/31/2014','1/31/2014',7,'manager'),
    (103,'1/1/2014','1/3/2014',5,'intern'),
    (103,'1/31/2014','1/31/2014',6,'intern'),
    (104,'1/14/2014','1/17/2014',5,'supervisor'),
    (104,'1/30/2014','1/31/2014',6,'supervisor');
    --select * from @EmpHours
    declare @EmpStatus table
    (employee int,start_date date,status varchar(20));
    insert into @EmpStatus values
    (101,'1/1/2014','parttime'),
    (101,'1/18/2014','fulltime'),
    (102,'1/1/2014','seasonal'),
    (102,'1/18/2014','fulltime'),
    (103,'1/1/2014','partime'),
    (103,'1/18/2014','fulltime'),
    (104,'1/4/2014','parttime'),
    (104,'1/18/2014','fulltime');
    WITH C AS
    SELECT es.employee,es.start_date, es.status, ROW_NUMBER() OVER(partition by employee ORDER BY start_date) AS rownum
    FROM @EmpStatus ES
    CTE_RANGES as(
    SELECT cur.employee,Cur.start_date start_range, cur.status,case when nxt.start_date is null then '2099-12-31' else dateadd(d,-1,Nxt.start_date) end AS end_range
    FROM C AS Cur
    left JOIN C AS Nxt
    ON Nxt.rownum = Cur.rownum + 1 and cur.employee=nxt.employee)
    select eh.*,es.status from @EmpHours EH join CTE_RANGES Es on EH.Employee =es.employee and EH.workday between es.start_range and es.end_range
    --where es.employee=101
    You will need a calender table too which can be joined to the output of the above query to get the weekend dates.
    You can find the T-SQL code to generate the calender here
    http://stackoverflow.com/questions/19191577/t-sql-function-to-generate-calendar-table
    and posting the questions with necessary DDL , DML (like I have posted) would help us a lot. 
    Satheesh
    My Blog

  • Oracle Stored Procedure's TYPE IS RECORD for join table columns

    Hi there,
    I'm trying to use the type is record to setup all my output columns; However, these columns are joined from 2 or more tables. i.e.,
    TYPE my_rec IS RECORD (
    myColumn1 varchar2(50),
    myColumn2 varchar2(20)
    where myColumn1 is slected from a join of table1 and table2, and myColumn2 is selected from a join of table2 and table3.
    as I tried to exec mySP, I got the error:
    wrong number or types of arguments in call to 'mySP'
    I know it is not "wrong number of arguments", but I don't know why these columns are wrong types? though I had TO_CHAR the new myColumn1 and myColumn2, I'm wondering if I should use %TYPE instead. If so, how do I do?
    Meanwhile, I think it may help if I post the code here:
    ===========================================
    create or replace package PHAStatusRpt is
    type pha_type is record(
    name varchar2(50),
    pha_start varchar2(12),
    current_step varchar2(50),
    dates varchar2(25),
    last_status varchar2(20)
    pha_rec pha_type;
    procedure PHAStatusData(ret_parm OUT pha_type);
    end PHAStatusRpt;
    create or replace package body PHAStatusRpt is
    procedure PHAStatusData(ret_parm OUT pha_type) is
    BEGIN
    SELECT name,
    TO_CHAR(DECODE(NVL(current_pha_step_name,'~'),'~',last_pha_date,current_pha_start),'mm/dd/yyyy') pha_start,
    DECODE(NVL(current_pha_step_name,'~'),'~','Complete',current_pha_step_name) current_step,
    DECODE(NVL(current_pha_step_name,'~'),'~',TO_CHAR(last_pha_date,'mm/dd/yyyy'),pp_date) dates,
    DECODE(NVL(current_pha_step_name,'~'),'~',null,last_pha_status) last_status
    INTO pha_rec
    FROM (SELECT pfeed_name||' ('||TO_CHAR(pfeed_dob,'mm/dd/yyyy')||')' ||'('||SUBSTR(pers_ssn,5,4)||')' name,
    current_pha_start,
    current_pha_step_name,
    last_pha_date,
    last_pha_status,
    TO_CHAR(pp.start_date,'mm/dd/yyyy')||'-'||NVL(TO_CHAR(pp.end_date,'mm/dd/yyyy'),'n/a') pp_date
    FROM v_pers_unit pu, personnel_readiness pr, person_processes pp
    WHERE pu.pers_pers_id=pr.pers_id AND pr.current_pha_step_pp_id=pp.pp_id(+) AND cmdstr_cs_id=95990)
    ORDER BY name;
    end PHAStatusData;
    end PHAStatusRpt;
    SQL> exec phastatusrpt.phastatusdata
    BEGIN phastatusrpt.phastatusdata; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PHASTATUSDATA'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ============================================
    Thanks in advance,
    SC

    case closed. I found the answer.

  • Feature request - use same colors for joined tables

    I brought two datasets into Power Map. Both have a shared segmentation dimension (joined in Power Pivot). Power Map doesn't pay attention to the fact that the tables are joined and does not use the same series colors.  I have to manually adjust all
    the colors (~2 dozen segments) which is painful and should not be necessary. Power Map should be smart and automatically use the same colors.

    You are more likely to
    produce some effect if you post your request here:
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • BRSPACE create new tablespace for compressed table

    Dear expert,
    I'm plannng to create new tablespace  PSAPCOMP for compressed table by brspace.
    the current total size of the tables that i want to compression is 1T.
    Now i have  2 question about the brspace script
    1.How big size should the PSAPCOMP be , let's say 500G?
    2. i'm confused about the datafile_dir value i should put (please refer to the attachment for current datafile_dir design)
    Could you help to correct/improve the scritpts as following?
    scriptA : brspace -f tscreate -t PSAPCOMP -s 5120 -a yes -i 100 -m 15360 -f sapdata4 -l 2 --> assign to sapdata4
    repeat scriptB for 20 times
    scriptB : brspace -f tsextend -t PSAPCOMP -s 5120 -a yes -i 100 -m 15360 -f sapdata4 -l 2 -f1 4 -f2 4 -f3 4 -f4 4 -f5 4 --> extend 25G in one run
    Qestion: is it OK to assign the PSAPCOMP only to "sapdata4"? or i should specify "-f sapdata1 sapdata2 sapdata3 sapdata4" so the table data can distribute among different sapdata_dir?
    Thank you!

    hi Kate,
    some of the questions depend on the "customer" decision.
    is it OK to assign the PSAPCOMP only to "sapdata4"?
    how much space is available? what kind of storage do they have? is totally stripped or not? is there "free" space on the other filesystems?
    1.How big size should the PSAPCOMP be , let's say 500G?
    as I explained to you already, it is expected that applying all compressions you can save 1/2 of the space but you have to test this as it depends on the content of the tables and selectivity of the indexes. Use the oracle package to simulate the savings for the tables you are going to compress.
    do you want the scripts interactive (option -c) or not?
    The SAP Database Guide: Oracle has all possible options so you only have to check them
    brspace -f tscreate -t PSAPCOMP -s 5120 -a yes -i 100 -m 15360 -f sapdata4 -l 2 --> assign to sapdata4
    if you want to create a 500 GB, why you limit the maximum size to 15360?

  • TABLESPACE issue with temporary table

    I am getting the error ORA-00922: missing or invalid option when compiling the following code. What seems to be causing the trouble is the line when I specified "TABLESPACE MISC". For some reason, CREATE GLOBAL TEMPORARY TABLE does not allow me to choose the tablespace "MISC" for the table. What did I do wrong here?
    My code
    CREATE OR REPLACE PROCEDURE Nmh_Sp_Chf_Patients(
    r_to_report      IN OUT      Nmh_Pkg_Chf_Patients.TYP_PKG_CHF_PATIENTS
    AS
    e_table_not_exist EXCEPTION;
    PRAGMA EXCEPTION_INIT (e_table_not_exist, -942);
    dACTIVE_CD NUMBER := Nmh_Get_Code_Value_By('DISPLAY_KEY', 48, 'ACTIVE');
    dENCNTRACTIVE_CD NUMBER := Nmh_Get_Code_Value_By('DISPLAY_KEY', 261, 'ACTIVE');
    dATTENDDOCCd NUMBER := Nmh_Get_Code_Value_By('DISPLAY_KEY', 333, 'ATTENDINGPHYSPROV');
    dCHFCd NUMBER := Nmh_Get_Code_Value_By('DISPLAY_KEY', 200, 'HEARTFAILUREHANDOUTS');
    dORDERCOMPLETECd NUMBER := Nmh_Get_Code_Value_By('DISPLAY', 6004, 'Order Complete');
    dORDEREDCd NUMBER := Nmh_Get_Code_Value_By('DISPLAY', 6004, 'Ordered');
    // Populating active inpatients //
    // NOTE: This approach IS proven TO be more efficient than //
    // joining ENCNTR_DOMAIN TABLE //
    /* Define the cursor variable type */
    TYPE t_ActiveInpatient IS REF CURSOR;
    /* and the variable itself. */
    r_ActiveInpatient t_ActiveInpatient;
    /* Variables to hold the output of r_ActiveInpatient. */
    v_patient_full_name VARCHAR2(100);
    v_encntr_id NUMBER;
    v_person_id NUMBER;
    v_mrn VARCHAR2(200);
    v_fin VARCHAR2(200);
    v_reg_dt_tm DATE;
    v_nurse_unit VARCHAR2(40);
    v_med_service VARCHAR2(40);
    v_attending_physician VARCHAR2(100);
    v_min_updt_cnt ENCNTR_PRSNL_RELTN.updt_cnt%TYPE;
    v_tmp_sql VARCHAR2(2000);
    v_tmp_char VARCHAR2(11);
    BEGIN
    BEGIN
         EXECUTE IMMEDIATE 'DROP TABLE NMH_SP_CHF_PATIENTS_1';
    EXCEPTION
         WHEN e_table_not_exist THEN NULL;
         END;     
    EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE NMH_SP_CHF_PATIENTS_1'
    || '(patient_full_name VARCHAR2(100), encntr_id NUMBER,'
    || ' person_id NUMBER, mrn VARCHAR2(200), fin VARCHAR2(200),'
    || ' reg_dt_tm DATE, nurse_unit VARCHAR2(40),'
    || ' med_service VARCHAR2(40), attending_physician VARCHAR2(100))'
    || ' TABLESPACE MISC ' -- If I commented out this line, it would have worked fine.
    || ' ON COMMIT PRESERVE ROWS';
    OPEN r_ActiveInpatient FOR
    SELECT nai.patient_full_name,
    nai.encntr_id,
    nai.person_id,
    nai.mrn,
    nai.fin,
    nai.reg_dt_tm,
    Nmh_Get_Code_Display(nai.loc_nurse_unit_cd) NURSE_UNIT,
    Nmh_Get_Code_Display(nai.med_service_cd) med_service
    FROM NMH_ACTIVE_INPATIENTS nai,
              ORDERS o
    WHERE o.encntr_id = nai.encntr_id
    AND o.catalog_cd = dCHFCd
    AND (o.order_status_cd = dORDERCOMPLETECd
    OR o.order_status_cd = dORDEREDCd)
    AND o.template_order_id = 0;
    LOOP
    FETCH r_ActiveInpatient INTO
    v_patient_full_name,
    v_encntr_id,
    v_person_id,
    v_mrn,
    v_fin,
    v_reg_dt_tm,
    v_nurse_unit,
    v_med_service;
    EXIT WHEN r_ActiveInpatient%NOTFOUND;
    BEGIN
    SELECT MIN(epr.updt_cnt)
    INTO v_min_updt_cnt
    FROM ENCNTR_PRSNL_RELTN epr
         WHERE epr.encntr_id = v_encntr_id
              AND epr.encntr_prsnl_r_cd = dATTENDDOCCd;
    EXCEPTION
              WHEN NO_DATA_FOUND THEN NULL;
              END;     
    BEGIN
         SELECT pr.name_full_formatted
         INTO v_attending_physician
         FROM ENCNTR_PRSNL_RELTN epr,
                   PRSNL pr
         WHERE epr.encntr_id = v_encntr_id
                   AND epr.encntr_prsnl_r_cd = dATTENDDOCCd
         AND epr.updt_cnt = v_min_updt_cnt
         AND pr.person_id = epr.prsnl_person_id;
    EXCEPTION
              WHEN NO_DATA_FOUND THEN NULL;
              END;     
                   v_tmp_sql := 'INSERT INTO NMH_SP_CHF_PATIENTS_1 ';
                   v_tmp_sql := v_tmp_sql || '(patient_full_name, encntr_id, person_id, ';
                   v_tmp_sql := v_tmp_sql || 'mrn, fin, reg_dt_tm, nurse_unit, ';
                   v_tmp_sql := v_tmp_sql || 'med_service, attending_physician) ';
                   v_tmp_sql := v_tmp_sql || 'VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9)';
    EXECUTE IMMEDIATE v_tmp_sql
                   USING               
                   v_patient_full_name, v_encntr_id, v_person_id, v_mrn,
                   v_fin, v_reg_dt_tm, v_nurse_unit,
                   v_med_service, v_attending_physician;
    END LOOP;
    v_tmp_sql := 'SELECT * FROM NMH_SP_CHF_PATIENTS_1 t';
    OPEN r_to_report FOR
    v_tmp_sql;
    END;
    /

    In looking through your code a bit more, it seems that you have a fundamental minunderstanding of how temporary tables work in Oracle (if you have a SQL Server background, Oracle temp tables and SQL Server temp tables are quite different).
    The definition of a temporary table is available to every session, so you do not want to create a temporary table dynamically. You would create the temporary table once, just like any other table. The data that is inserted into a temporary table is local to that session, so you can have multiple sessions inserting data and each will see only its own data. By creating the temporary table outside of the stored procedure, you can avoid all the dynamic SQL you are currently doing, which is going to make the codea lot clearer, plus you avoid the implicit commit of a DDL operation in the procedure.
    As to the error you're getting, is there an ORA-xxxxx error message being returned? If your front end is hiding that error, try running the procedure from SQL*Plus and post the error. Of course, first try moving the table declaration outside the procedure.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Are there some Golden Rules about tablespace design?

    hi gurus
    I am working for an assignment about tablespace design for our new BOSS system whic is a HEAVE OLTP system。
    I dont know how to decide how many tablespacesare are going to be there.
    According my existing experience,I think i should design tablespace according to these ruels:
    1) put Big tables and Small tables in differents tablespaces
    2) put tables and indexes in differents tablespaces
    3) seprate frequent updated tables to differents tablespaces
    4) put comparatively static(means not updated frequently) tables together in one or two tablespaces
    5) .....
    And what else rules you may add to? Thank u in advance
    Edited by: KevinMao on Nov 10, 2009 1:25 AM

    After viewing some links from google i would like to sum-up Golden Rule for tbs design:
    1. Always create locally managed tablespace (extent management).
    2. Never create tablespace with hundreds of small datafiles for avoid slower checkpointing.
    3. Segment types that are used the same way should be stored together.
    4. The system should be designed for its most common usage:
    5. Separate areas should exist for exceptions.
    6. Contention amoung tablespaces should be minimized.
    7. The data dictionary should be isolated.
    8. Always give a proper name to tablespace; so that it may easy to know that what this tablespace contains.
    9. http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Recommendations_to_minimize_disk_I/O_contention&anchor=iooracle
    Hth
    Girish Sharma

  • Joining tables in different databases

    Hi,
    I know we can access multiple databases like Oracle, Informix etc. through a single toplink session using session broker. Also in toplink documentation it says there is a work around for joining tables that exists in different databases i.e. joining an Oracle table with an Informix Table. If anyone had tried this or if it is possible, please let me know how to do this.
    Thanks..

    If I could know, how to perform or some sample code, for the following two steps it would be great.
    Write descriptor ammendment code to bind together that go from (A) to (B) and (B) to (A).
    Be sure to map the ammendment descriptors in the mapping workbench.Or please point me to the right toplink documentation or examples.
    Thanks a lot for your help.

  • Can we implement the custom sql query in CR for joining the two tables

    Hi All,
    Is there anyway to implement the custom sql query in CR for joining the two tables?
    My requirement here is I need to write sql logics for joining the two tables...
    Thanks,
    Gana

    In the Database Expert, expand the Create New Connection folder and browse the subfolders to locate your data source.
    Log on to your data source if necessary.
    Under your data source, double-click the Add Command node.
    In the Add Command to Report dialog box, enter an appropriate query/command for the data source you have opened.
    For example:
    SELECT
        Customer.`Customer ID`,
        Customer.`Customer Name`,
        Customer.`Last Year's Sales`,
        Customer.`Region`,
        Customer.`Country`,
        Orders.`Order Amount`,
        Orders.`Customer ID`,
        Orders.`Order Date`
    FROM
        Customer Customer INNER JOIN Orders Orders ON
            Customer.`Customer ID` = Orders.`Customer ID`
    WHERE
        (Customer.`Country` = 'USA' OR
        Customer.`Country` = 'Canada') AND
        Customer.`Last Year's Sales` < 10000.
    ORDER BY
        Customer.`Country` ASC,
        Customer.`Region` ASC
    Note: The use of double or single quotes (and other SQL syntax) is determined by the database driver used by your report. You must, however, manually add the quotes and other elements of the syntax as you create the command.
    Optionally, you can create a parameter for your command by clicking Create and entering information in the Command Parameter dialog box.
    For more information about creating parameters, see To create a parameter for a command object.
    Click OK.
    You are returned to the Report Designer. In the Field Explorer, under Database Fields, a Command table appears listing the database fields you specified.
    Note:
    To construct the virtual table from your Command, the command must be executed once. If the command has parameters, you will be prompted to enter values for each one.
    By default, your command is called Command. You can change its alias by selecting it and pressing F2.

Maybe you are looking for

  • Setting up my new ipad 3

    it is connected to wifi but won't continue to the next step. I have chosen and connected to a network but the "next" button is not highlighted and nothing else is available apart from "connect to itunes" which is for when there's no wifi connection.

  • HT1349 Online Radio Help Needed

    I have a new PC and I can't seem to get the radio part of iTunes to come up with a list of all the stations. Can someone please help me fix this. Thanks so much in advance

  • Reg:Import Purchase Order Scenario

    Hi All,     In the Import Purchase Order Scenario SVB load will come, which will display in MIRO after the PO creation     i have an requirement that in the MIGO transaction i just want to make the SVB load to 0,because if the SVB load comes it just

  • Table of Parked document

    Hi, Can you tell me ,when we park any document with any parked t.code , in which FI table it captures.Once posted then data captures in the table but before posting we want to know the table for parked document. Thanks, Dharmveer

  • Facebook crashed every time it starts...

    Facebook will show the first screen and then a split second later close with this error message:  net.rim.device.api.system.UnsupportedOperationException Nothing stupid like rebooting, pulling the battery, removing the program, reinstalling, etc. fix