SQL Statistical functions?

Trying to execute from ttisql to my readonly cache group:
Var_samp, Var_pop, stddev_samp, stddev_pop, median, and stats_mode all failed in TT. Is there no support for these statistics functions? If not, when can I expect to see them supported?
regards,
Henri

No, I'm afraid that we don't currently support any of those functions, sorry. I'm not sure yet what is planned for the next release so I can't say if they will be in that or not.
Chris

Similar Messages

  • Add statistical function to this?

    I have this SQL which aggregate quantity per week.
    WITH  weeks_vw AS
        ( SELECT  DISTINCT TO_CHAR(fill_year_day,'IYYYIW') AS fill_year_week
                FROM
               ( SELECT  to_date('2012-11-01','yyyy-mm-dd')  + (ROWNUM-1) AS fill_year_day
                        FROM    DUAL
                        CONNECT BY      LEVEL <= TRUNC(to_date('2012-12-10','yyyy-mm-dd') - to_date('2012-11-01','yyyy-mm-dd') ) + 1)
    SELECT  a.material, a.plant, sum(NVL(quantity,0)) AS sales_qty_sum
        FROM
    SELECT  t.material, t.plant, t.quantity, TO_CHAR(t.posting_date,'IYYYIW') AS posting_week
             FROM    tblTotalCom t
             Where     t.plant = '1900'
             AND     t.Posting_date >= to_date('2012-11-01','yyyy-mm-dd')
             AND     t.Posting_date <= to_date('2012-12-10','yyyy-mm-dd')
             AND     t.material = 'Label1' ) A
        PARTITION BY (a.material,a.plant) RIGHT OUTER JOIN weeks_vw  ON weeks_vw.fill_year_week = A.posting_week
        GROUP BY  a.material, a.plant, fill_year_weekNow I want to add a statistical function as below in this SQL to remove outliers.
    WITH     got_analytics     AS
         SELECT       deptno
         ,       ename
         ,       sal
         ,       AVG (sal)    OVER (PARTITION BY  deptno)     AS avg_sal
         ,       STDDEV (sal) OVER (PARTITION BY  deptno)     AS stddev_sal
         FROM       scott.emp
    SELECT       a.*
    ,       CASE
               WHEN  ABS (sal - avg_sal)     > stddev_sal * 1.0   -- Change this number
               THEN  '*** Outlier ***'
           END     AS outlier
    FROM       got_analytics  a
    ORDER BY  deptno
    ,            sal
    ;Do not know how to do it ...?

    Why did you answer that as a question? Are you not sure which approach you need? Is my question unclear? Obviously, it's hard to provide something that helps you if we're not sure exactly what you are trying to accomplish...
    WITH  weeks_vw AS
        ( SELECT  DISTINCT TO_CHAR(fill_year_day,'IYYYIW') AS fill_year_week
                FROM
               ( SELECT  to_date('2012-11-01','yyyy-mm-dd')  + (ROWNUM-1) AS fill_year_day
                        FROM    DUAL
                        CONNECT BY      LEVEL <= TRUNC(to_date('2012-12-10','yyyy-mm-dd') - to_date('2012-11-01','yyyy-mm-dd') ) + 1)
    SELECT material,
          plant,
          sales_qty_sum,
          avg(sales_qty_sum) over () avg_sum,
          stddev(sales_qty_sum) over () std_dev_sum,
          abs((sales_qty_sum - avg(sales_qty_sum) over ())/ stddev(sales_qty_sum) over ()) stddevs_away
      FROM (
          SELECT  a.material, a.plant, sum(NVL(quantity,0)) AS sales_qty_sum
              FROM
                SELECT  t.material, t.plant, t.quantity, TO_CHAR(t.posting_date,'IYYYIW') AS posting_week
                  FROM    tblTotalCom t
                 Where     t.plant = '1900'
                  AND     t.Posting_date >= to_date('2012-11-01','yyyy-mm-dd')
                  AND     t.Posting_date <= to_date('2012-12-10','yyyy-mm-dd')
                  AND     t.material = 'Label1' ) A
           PARTITION BY (a.material,a.plant) RIGHT OUTER JOIN weeks_vw  ON weeks_vw.fill_year_week = A.posting_week
           GROUP BY  a.material, a.plant, fill_year_week)should compute the average sum, the standard deviation of the sum, and the number of standard deviations a particular row is from the mean. You can then filter out those rows that are more than 1 standard deviation from the mean
    WITH  weeks_vw AS
        ( SELECT  DISTINCT TO_CHAR(fill_year_day,'IYYYIW') AS fill_year_week
                FROM
               ( SELECT  to_date('2012-11-01','yyyy-mm-dd')  + (ROWNUM-1) AS fill_year_day
                        FROM    DUAL
                        CONNECT BY      LEVEL <= TRUNC(to_date('2012-12-10','yyyy-mm-dd') - to_date('2012-11-01','yyyy-mm-dd') ) + 1)
    SELECT *
      FROM (
    SELECT material,
          plant,
          sales_qty_sum,
          avg(sales_qty_sum) over () avg_sum,
          stddev(sales_qty_sum) over () std_dev_sum,
          abs((sales_qty_sum - avg(sales_qty_sum) over ())/ stddev(sales_qty_sum) over ()) stddevs_away
      FROM (
          SELECT  a.material, a.plant, sum(NVL(quantity,0)) AS sales_qty_sum
              FROM
                SELECT  t.material, t.plant, t.quantity, TO_CHAR(t.posting_date,'IYYYIW') AS posting_week
                  FROM    tblTotalCom t
                 Where     t.plant = '1900'
                  AND     t.Posting_date >= to_date('2012-11-01','yyyy-mm-dd')
                  AND     t.Posting_date <= to_date('2012-12-10','yyyy-mm-dd')
                  AND     t.material = 'Label1' ) A
           PARTITION BY (a.material,a.plant) RIGHT OUTER JOIN weeks_vw  ON weeks_vw.fill_year_week = A.posting_week
           GROUP BY  a.material, a.plant, fill_year_week))
    WHERE stddevs_away <= 1Note that this will generally filter out ~33% of your data if you assume a normal distribution so this is a rather odd definition of "outlier". I believe in the earlier question you asked, it was suggested that you would probably want to pick cutoff of more than 1 standard deviation
    Also, it would be very helpful if you posted the DDL to create the table, the DML to populate some sample data, and the expected results. Obviously, since I don't have your tables, I can't test the queries I posted which makes it very possible that I introduced an inadvertent syntax error.
    Justin
    Edited by: Justin Cave on Dec 11, 2012 5:15 PM

  • Logical Operations in SQL decode function ?

    Hi,
    Is it possible to do Logical Operations in SQL decode function
    like
    '>'
    '<'
    '>='
    '<='
    '<>'
    not in
    in
    not null
    is null
    eg...
    select col1 ,order_by,decode ( col1 , > 10 , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 , <> 10 , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 , not in (10,11,12) , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 ,is null , 0 , 1)
    from tab;
    Regards,
    infan
    Edited by: user780731 on Apr 30, 2009 12:07 AM
    Edited by: user780731 on Apr 30, 2009 12:07 AM
    Edited by: user780731 on Apr 30, 2009 12:08 AM
    Edited by: user780731 on Apr 30, 2009 12:08 AM
    Edited by: user780731 on Apr 30, 2009 12:09 AM

    example:
    select col1 ,order_by,case when col1 > 10 then 0 else 1 end
    from tab;
    select col1 ,order_by,case when col1 &lt;&gt; 10 then 0 else 1 end
    from tab;
    select col1 ,order_by,case when col1 not in (10,11,12) then 0 else 1 end
    from tab;As for testing for null, decode handles that by default anyway so you can have decode or case easily..
    select col1 ,order_by,decode (col1, null , 0 , 1)
    from tab;
    select col1 ,order_by,case when col1 is null then 0 else 1 end
    from tab;

  • How to Passing clob to PL/SQL pipeline function

    I have a PL/SQL stored function which takes clob as input parameter and sends the results in a pipe line.
    create or replace function GetIds(p_list clob, p_del varchar2 := ',') return ideset_t pipelined is
    I am using ojdbc14.jar (Oracle 10g driver) with oracle 9i (9.2.0.1.0).
    I want to use the following SQL Query select * from table(GetIds(clob))
    Now the question is how can I pass the clob from JDBC?
    Here is my client code
    PreparedStatement stmt = con.prepareStatement("SELECT COLUMN_VALUE FROM TABLE(GETIDS(?, ','))");
    stmt.setCharacterStream(1, new StringReader(str), str.length());
    stmt.executeQuery();
    I get the following error when I try to run the program. The same thing works fine if the chracter lenght is less than some chaaracters.
    java.sql.SQLException: ORA-01460: unimplemented or unreasonable conversion requested
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:420)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:896)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960)
         at Test.main(Test.java:42)
    Exception in thread "main"
    The setChracterStream works for any insert/update clob. Example when I tried the query (INSERT INTO CLOB_TEST VALUES(?)) setCharacterStream just works fine.
    Please any one can help me how to solve this.
    Thanks in advance.

    Hóla LuÃs,
    when you pick the PL/SQL function body returning a boolean, it implicitly means that TRUE means OK, while FALSE means error, always.
    In order to associate such error to a given form field, you have to go back to the page definiton / validations and specify the name of the item in the corresponding field.
    When you first create the validation rule, this value is not present even if you ask for the error message inline with the field.
    The error message text can be specified in the validation definition, if I am not wrong.
    When you need to return special error messages, including dynamic content for instance, you can use the Function Returning Error Message type, which reports an error when the string returned by the function is not null. This comes in handy when you want to display an item's code, for example, rather than generic text.
    Even in this case, you must go back to the validation and specify the name of the field if you want to see it inline.
    Hope it helps,
    Flavio

  • SQL query, function or SP for converting varbinary to image(.jpg format).

    Dear Sir/Mam
    I want SQL query, function or SP which converts binary data to image (.jpg format).
    I m able to convert image (.jpg format) to varbinary. But not able to convert vice versa.
    thanks in advance.

    Binary data is binary data - "image" is only an intrepretation of binary data.  Therefore your question makes little sense in the context of sql server since it does not have any facilities to utilize images.  Since you provide no context, I'm
    guessing that you are trying to retrieve an image stored in the database in a varbinary column and have your application use it as an image.  If so, you should post your question to a forum that is specific to your development environment.  

  • Query of queries disallows SQL right() function

    We're attempting to do a query of queries using the SQL
    right() function like this:
    select *
    from getresults
    where right([key],charindex('\',reverse([key]),1)-1) not in
    (#quotedvaluelist(getexcluded.file_name)#)
    We've even replaced that where clause with a much more simple
    where right([key])='m'
    just to make sure that it wasn't the nesting functions that
    were causing the problem.
    In either case, we get the error:
    Query of Queries syntax error.
    Encountered "right" at line 0, column 0. Incorrect
    conditional expression,
    Expected one of [like|null|between|in|comparison] condition,
    What SQL functions are disallowed from query of queries?
    Thanks,
    Kris

    Nasty stuff huh. Just happened to discover myself today that
    Left doesn't work. I'd suspect that Aggregate functions are the
    ONLY ones that will work. It would have been nice if they'd at
    least allowed CF vs DB functions in their own "database" language.
    BTW, also discovered that Count() returns Null rather than 0
    when there aren't any per your WHERE clause.

  • Incorrect syntax errors in sql server function. Please help.

    This is my sql server function:
    create function dbo.CleanTheStringAdv (@theString nvar
    char(500), @CleanMode as int) 
    returns nvarchar(500)  
    begin  
    --define variables
    declare @strAlphaNumeric nvarchar(500)  
    declare @i int
    declare @strChar nvarchar(500)
    declare @CleanedString nvarchar(500)
    --initiate values
    set @CleanedString =''  
    set @theString = @theString + ''
    SET @i = 1
    --Determine if we are looking for numeric values only or numbers and letters
    return case @CleanMode
       WHEN 1
       THEN @strAlphaNumeric = '0123456789'
       WHEN 2
       THEN @strAlphaNumeric = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
       WHEN 3
       THEN @strAlphaNumeric = '|0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
       else 0
     end 
    --Search through chars in the string passed to the function
        while (@i <= Len(@theString))
    begin
    @strChar = substring(@theString, @i, 1)
    If (charindex(@strAlphaNumeric, @strChar) <>0)
    --if the current char being reviewed is valid then add it to the new string
    begin
    @CleanedString = @CleanedString + @strChar
    end
    end
    return @CleanedString
    and below are the syntax errors I see when I press F5:
    Msg 102, Level 15, State 1, Procedure CleanTheStringAdv, Line 24
    Incorrect syntax near '='.
    Msg 102, Level 15, State 1, Procedure CleanTheStringAdv, Line 39
    Incorrect syntax near '@strChar'.
    Msg 102, Level 15, State 1, Procedure CleanTheStringAdv, Line 43
    Incorrect syntax near '@CleanedString'.
    Any help is highly appreciated.....

    Here is the full code for the function:
    create function dbo.CleanTheStringAdv (@theString nvarchar(500), @CleanMode as int)
    returns nvarchar(500)
    as
    begin
    --define variables
    declare @strAlphaNumeric nvarchar(500)
    declare @i int
    declare @strChar nvarchar(500)
    declare @CleanedString nvarchar(500)
    --initiate values
    set @CleanedString =''
    set @theString = @theString + ''
    SET @i = 1
    --Determine if we are looking for numeric values only or numbers and letters
    SET @strAlphaNumeric = case @CleanMode
    WHEN 1
    THEN '0123456789'
    WHEN 2
    THEN '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    WHEN 3
    THEN '|0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    else 0
    end
    --Search through chars in the string passed to the function
    while (@i <= Len(@theString))
    begin
    set @strChar = substring(@theString, @i, 1);
    If (charindex(@strAlphaNumeric, @strChar) <>0) --if the current char being reviewed is valid then add it to the new string
    begin
    SET @CleanedString = @CleanedString + @strChar;
    end
    END
    return @CleanedString;
    END

  • Problem with SQL Convert Function Junk Character

    Hi All,
    We have a database field that has a value of “2.020 OPERATOE’S CAB – GLASSES” on the front end of Oracle E-Business Suite. When we are spooling that column(in PLSQL) with the SQL covert function , one of the characters(’) in the string is not getting converted properly. It is displayed as a junk character in the spooled file.
    We used CONVERT(p_column,'WE8ISO8859P1','UTF8') for converting the string and utl_file api for spooling the output file. Please note that converted string is passed to utl_file.fopen directly.
    Following are the nls_parameters values.
    NLS_CHARACTERSET ~~ UTF8
    NLS_NCHAR_CHARACTERSET ~~ AL16UTF16
    Any inputs are welcome.
    Thanks
    gt1942

    Hello All,
    Sorry, If I am opening the blog in the wrong place as this is the first time.
    my out looks as follows.
    "02920  "
    but when i see in the application there is nuthing in the end.
    so I used regexp_replace(p_vendor_dtl,'[^[!-~]]*',''), But this is removing spaces also. I don't want to remove space. I want to remove this character only.
    Please help
    Thanks.

  • Sql like function in View Object for progammatically

    Hi friends,
    I used Jdeveloper 11.1.1.4.0 ,I need how to get the datas from database using sql like function(select * from tablename where name like 'p%') using viewCriteria by
    programmatically.
    Thanks & Regards,
    Priya.
    Edited by: priya on Apr 8, 2011 3:48 AM
    Edited by: priya on Apr 8, 2011 3:49 AM

    Check the docs: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvvo.htm#sm0341
    Timo

  • Use of Pl/Sql and Function

    Hi,
    Can we use a PL/Sql package or a Function in a sql query. If yes How.??
    Regards
    Sameer

    Sameer8 wrote:
    Can we use a PL/Sql package or a Function in a sql query. If yes How.??A function (whether declared in a package or a stand alone stored function) may be used in SQL providing it does not contain any OUT parameters...
    SQL> create function testf(x OUT number) return number is
      2  begin
      3    x := 1;
      4    return 2;
      5  end;
      6  /
    Function created.
    SQL> var my_x number
    SQL> select testf(:my_x) from dual;
    select testf(:my_x) from dual
    ERROR at line 1:
    ORA-06572: Function TESTF has out argumentsAnd it doesn't do any DML...
    SQL> create table x (x number);
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function testf return number is
      2  begin
      3    insert into x values (1);
      4    return 1;
      5* end;
    SQL> /
    Function created.
    SQL> select testf() from dual;
    select testf() from dual
    ERROR at line 1:
    ORA-14551: cannot perform a DML operation inside a query
    ORA-06512: at "SCOTT.TESTF", line 3

  • SQL Analytical Functions in 9i

    Hi
    I am trying to determine of the SQL Analytical Functions in Oracle 9i like LAG, NTILE, PERCENT_RANK etc are part of Enterprise without OLAP installed.
    They will be very useful to a set of queries I am trying to build but I don't want to add OLAP to the mix if I can help it as the customer won't be OLAP enabled
    Cheers

    Hi
    I am trying to determine of the SQL Analytical Functions in Oracle 9i like LAG, NTILE, PERCENT_RANK etc are part of Enterprise without OLAP installed.
    They will be very useful to a set of queries I am trying to build but I don't want to add OLAP to the mix if I can help it as the customer won't be OLAP enabled
    Cheers

  • Improve built in SQL MAX function

    Hi
    I am trying to improve the performance of the built in SQL max function. right now searching through over 500,000 rows takes lot of time which can be reduced. Can anyone suggest me something which would be helpful in this or may be give me a link if it has been discussed before?
    Anything is appreciated.
    Thanks

    Tolls wrote:
    Um...considering you were planning on improving on the MAX function, I sort of thought you might actually know how to use it. Otherwise how would you know it was running slowly?thanks Tolls i'd figured it out right after i posted it. i guess i was too excited after reading (you got it in milliseconds) that posted right away without doing anything myself..but yeah it did make it super fast..thanks a lot for your help and time..
    cotton.m wrote:
    d_khakh wrote:
    hi tolls thanks for getting back
    could u explain how did u do that? i found out how to create index..i have the following statement:
    create index col on table2 (col2);
    cud u tell me how to go from here and find the max in col2..thanks again for ur help?
    sigh
    Where to go from here? Just execute your damn query. If you really did create the index on the right column and your database isn't stupid and there isn't a lot more to this problem then you told us about like some where clauses then that's it. She's as fast as she's going to get.
    And remember, it's impolite to converse in a public forum while chewing your cud. Unless of course you actually meant "could" but were just too lazy to type it. Don't be lazy, use full words. Thanks.like i said above..i figured it out after some time.
    i wasn't being lazy ..thats msn talk..i thought people understood that..anyways your point noted too.

  • PL/SQL Pipelined Function to Compare *ANY*  2 tables

    I am trying to create a pipelined function in 10g R1 that will take the name of two tables, compare the the tables using dynamic SQL and pipe out the resulting rows using the appropriate row type. The pipelined function will be used in a DML insert statement.
    For example:
    create table a (f1 number, f2, date, f3 varchar2);
    create table b (f1 number, f2, date, f3 varchar2);
    create table c (f1 number, f2, date, f3 varchar2);
    create or replace TYPE AnyCollTyp IS TABLE OF ANYTYPE;
    create or replace TYPE CRowType IS c%ROWTYPE;
    create or replace TYPE CRowTabType IS table of CRowType;
    CREATE OR REPLACE FUNCTION compareTables (p_source IN VARCHAR2, p_dest IN VARCHAR2)
    RETURN AnyCollTyp PIPELINED
    IS
    CURSOR columnCur (p_tableName IN user_tab_columns.table_name%TYPE)
    IS
    SELECT column_name, column_id
    FROM user_tab_columns
    WHERE table_name = p_tableName
         ORDER BY column_id;
    l_cur sys_refcursor;
    l_rec ANYTYPE;
    l_stmt VARCHAR2 (32767);
    BEGIN
    l_stmt := 'select ';
    FOR columnRec IN columnCur (p_dest)
    LOOP
    l_stmt := l_stmt || CASE
    WHEN columnRec.column_id > 1
    THEN ','
    ELSE ''
    END || columnRec.column_name;
    END LOOP;
    l_stmt := l_stmt || ' from ' || p_source;
    l_stmt := l_stmt || ' minus ';
    l_stmt := l_stmt || ' select ';
    FOR columnRec IN columnCur (p_dest)
    LOOP
    l_stmt := l_stmt || CASE
    WHEN columnRec.column_id > 1
    THEN ','
    ELSE ''
    END || columnRec.column_name;
    END LOOP;
    l_stmt := l_stmt || ' from ' || p_dest;
    OPEN l_cur FOR l_stmt;
    LOOP
    FETCH l_cur
    INTO l_rec;
    PIPE ROW (l_rec);
    EXIT WHEN l_cur%NOTFOUND;
    END LOOP;
    CLOSE l_cur;
    RETURN;
    END compareTables;
    The pipelined function gets created without error. However, the testCompare procedure gets an error:
    SQL> create or replace procedure testCompare is
    begin
    insert into c
    select *
    from (TABLE(CAST(compareTables('a','b') as cRowTabType)));
    dbms_output.put_line(SQL%ROWCOUNT || ' rows inserted into c.');
    end;
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TESTCOMPARE:
    LINE/COL ERROR
    3/4 PL/SQL: SQL Statement ignored
    5/47 PL/SQL: ORA-22800: invalid user-defined type
    Does anyone know what I am doing wrong? Is there a better way to compare any two tables and get the resulting rows?

    904640 wrote:
    Hi All,
    Is it possible to post messages to weblogic JMS queue from pl/sql procedure/function?
    From this Queue, message will be read by OSB interface.
    Any help will be highly appreciated.
    http://www.lmgtfy.com/?q=oracle+pl/sql+weblogic+jms+queue

  • Calling SQL Server function in ODI

    Hi All,
    In the Target data store in the interface I have a column called COUNT_BY_CERTDATE column and in the mapping I have teh following syntax, which does not work.
    SUM(CASE WHEN ((dbo.getcertdate(person_id,getdate()) >= current_timestamp) THEN 1 ELSE 0 END). The 'getcertdate' is a SQL Server function which returns a date.
    I am getting a "Expression is not valid for this DBMS error" with the details as getcertdate is not a recognized built in function name. Please help on fixing this issue.
    Thanks for your time and help.

    Its defined on the source.
    I am getting the following error, when I execute it.
    ODI-1228: Task Load_Fact_Table1 (Integration) fails on the target MICROSOFT_SQL_SERVER connection SQLSERVER_USAASC.
    Caused By: java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Cannot find either column "main" or the user-defined function or aggregate "main.dbo.getCertDate", or the name is ambiguous.
    Edited by: ssk1974 on Dec 20, 2012 6:30 AM

  • Pl-Sql Oracle Function Concurrency Issue

    Hi All,
    Issue - pl-sql Oracle Function performance issue, when muliple users are accessing the function
    Detail -
    Oracle 11g / Linux Server
    I have developed a pl-sql oracle function to retrieve information from 3 tables, output as a particluar type array.
    Single request is getting processed within 2.2 seconds, but when multiple request are sent concurrently <tested with 50>, time taken for each output is different.
    BreakUp of Response times:-
    8 messages took - 2.2 sec
    +8 messages took - 4.4 sec
    ++8 messages took - 6.6 sec....etc
    I'm looking for any DB tunning parameter, which will help to resolve this issue.
    My only aim is to expose developed function to multiple users, who all can access it concurrently, but response should limit within 2.2 seconds.
    Any thoughts + guidance is higly appreciated.
    Thanks
    Preetam Singh

    Supporting data insert statements:
    =======================================================================================================================
    REM INSERTING into EXPERTISE
    Insert into EXPERTISE (USH_USER_NAME,USH_SKILL_SET1,USH_SKILL_SET2,USH_SKILL_SET3,USH_SKILL_SET4,USH_SKILL_SET5,USH_SKILL_SET6,USH_SKILL_SET7,USH_SKILL_SET8,USH_SKILL_SET9,USH_SKILL_SET10,USH_SKILL_SET11,USH_SKILL_SET12,USH_SKILL_SET13,USH_SKILL_SET14,USH_SKILL_SET15,USH_SKILL_SET16,USH_SKILL_SET17,USH_SKILL_SET18,USH_SKILL_SET19,USH_SKILL_SET20) values ('A','ENGLISH','FRENCH','HINDI',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into EXPERTISE (USH_USER_NAME,USH_SKILL_SET1,USH_SKILL_SET2,USH_SKILL_SET3,USH_SKILL_SET4,USH_SKILL_SET5,USH_SKILL_SET6,USH_SKILL_SET7,USH_SKILL_SET8,USH_SKILL_SET9,USH_SKILL_SET10,USH_SKILL_SET11,USH_SKILL_SET12,USH_SKILL_SET13,USH_SKILL_SET14,USH_SKILL_SET15,USH_SKILL_SET16,USH_SKILL_SET17,USH_SKILL_SET18,USH_SKILL_SET19,USH_SKILL_SET20) values ('B',null,'GERMAN','CHINIESE','HINDI',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into EXPERTISE (USH_USER_NAME,USH_SKILL_SET1,USH_SKILL_SET2,USH_SKILL_SET3,USH_SKILL_SET4,USH_SKILL_SET5,USH_SKILL_SET6,USH_SKILL_SET7,USH_SKILL_SET8,USH_SKILL_SET9,USH_SKILL_SET10,USH_SKILL_SET11,USH_SKILL_SET12,USH_SKILL_SET13,USH_SKILL_SET14,USH_SKILL_SET15,USH_SKILL_SET16,USH_SKILL_SET17,USH_SKILL_SET18,USH_SKILL_SET19,USH_SKILL_SET20) values ('C','ENGLISH',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    =======================================================================================================================
    ==================================================================
    REM INSERTING into WORKING
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('A','MON','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('A','TUE','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('A','WED',null,null);
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('A','THU','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('A','FRI','09:00','12:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('B','MON','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('B','TUE','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('B','WED','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('B','THU','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('B','FRI','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('C','MON',null,null);
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('C','TUE','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('C','WED','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('C','THU','09:00','18:00');
    Insert into WORKING (NAME,WEEKDAY,DAYSTARTTIME,DAYENDTIME) values ('C','FRI','09:00','12:00');
    ==================================================================
    =====================================================================================================================
    REM INSERTING into SCHEDULE
    Insert into SCHEDULE (APPOINTMENTDATE,APPOINTMENTSTART,APPOINTMENTEND,STATUS,NAME) values (to_timestamp('11-FEB-12 10.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),to_timestamp('11-FEB-12 10.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),to_timestamp('11-FEB-12 11.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),'MEETING','A');
    Insert into SCHEDULE (APPOINTMENTDATE,APPOINTMENTSTART,APPOINTMENTEND,STATUS,NAME) values (to_timestamp('11-FEB-12 10.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),to_timestamp('11-FEB-12 10.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),to_timestamp('11-FEB-12 11.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),'TRAINING','B');
    Insert into SCHEDULE (APPOINTMENTDATE,APPOINTMENTSTART,APPOINTMENTEND,STATUS,NAME) values (to_timestamp('13-FEB-12 10.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),to_timestamp('11-FEB-12 10.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),to_timestamp('11-FEB-12 11.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),'MEETING','A');
    Insert into SCHEDULE (APPOINTMENTDATE,APPOINTMENTSTART,APPOINTMENTEND,STATUS,NAME) values (to_timestamp('11-FEB-12 10.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),to_timestamp('11-FEB-12 11.00.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),to_timestamp('11-FEB-12 11.30.00.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'),'MEETING','B');
    =====================================================================================================================
    Edited by: 910614 on Feb 10, 2012 9:29 AM

Maybe you are looking for

  • Can not install Windows 8.1 to a Bitlocker Pre-Provisioned volume

    Hello, I'll come straight to the point. What I'm trying to do is to install Windows 8.1 Enterprise to a Pre-Provisioned volume but Windows does not let me do that. The steps I've performed are. With Microsoft ADK I created me a WinPE media which has

  • Can anybody help? My Safari browser keeps crashing. The whole window just turns grey.

    Can anybody help? My Safari browser keeps crashing on iMac 10.7.5. The whole window just turns grey. It started happening around the time of the new bookmarks menu upgrade recently which changed the bookmarks to be only on the side and makes it so yo

  • Checkbox interactive report not working...

    Problem in image http://i.imgur.com/9Ptym.png my interactive report query select "ROWID", "DB_ITEM_ID", "DB_CUST_ID", "DB_NAME", "DB_ADDRESS", APEX_ITEM.CHECKBOX (3,DB_CUST_ID) AS Edit from "#OWNER#"."DB" for some reason my check box would show up in

  • Help to get from video to sequence (newbie - Print person learning video)

    I have .vob video files I am bringing into iSquint and converting to .mp4. I then bring that into MPEG Streamclip and have tried many different conversions. I bring them into FCE HD 3.5.1. The video pane plays the file, but when I drag & drop the fil

  • Custom Metadata url

    I have some custom metadata as type url and the button works perfectly in the metadata panel to open the page. I was wondering is there a way to show text for the url in the field instead of the url itself. Like you do in a html like with the text be