What SQL statement is provided equivalent of?

Here is an example of desk, I can't understand how to bring together these tables? I mean if the desk is the equivalent of:
Select a.value, b.value c.value
of v_binlog_cache_size a, v_Binlog_cache_disk_use b, v_Binlog_cache_use c
where a.Variable_name = 'binlog_cache_size' and b.Variable_name ='Binlog_cache_disk_use ' and c.Variable_name ='Binlog_cache_use ';

************************************************************************************
< Metric NAME = "BinlogCache" TYPE = "TABLE" >
< display >
< NLSID label = "mmd_bc_BinlogCache" > BinlogCache < / Label >
< / display >
< TableDescriptor >
< ColumnDescriptor NAME = "binlog_cache_size' TYPE 'NUMBER' = >
< display >
< NLSID label = "mmd_bc_binlog_cache_size" > binlog_cache_size < / Label >
< / display >
< / ColumnDescriptor >
< ColumnDescriptor NAME = "Binlog_cache_disk_use" TYPE = "NUMBER" TRANSITIONAL = "TRUE" >
< display >
< NLSID label = "mmd_bc_Binlog_cache_disk_use" > Binlog_cache_disk_use < / Label >
< / display >
< / ColumnDescriptor >
< ColumnDescriptor NAME = "Binlog_cache_use" TYPE = "NUMBER" TRANSITIONAL = "TRUE" >
< display >
< NLSID label = "mmd_bc_Binlog_cache_use" > Binlog_cache_use < / Label >
< / display >
< / ColumnDescriptor >
< / TableDescriptor >
< ExecutionDescriptor >
< NAME getTable = "MysqlStatusAndVariables" / >
< NAME GetView = "v_binlog_cache_size" FROM_TABLE = "MysqlStatusAndVariables" >
< filter COLUMN_NAME = "Nom_de_variable" = "EQ" OPERATOR > binlog_cache_size < / filter >
< / GetView >
< NAME GetView = "v_Binlog_cache_disk_use" FROM_TABLE = "MysqlStatusAndVariables" >
< filter COLUMN_NAME = "Nom_de_variable" = "EQ" OPERATOR > Binlog_cache_disk_use < / filter >
< / GetView >
< NAME GetView = "v_Binlog_cache_use" FROM_TABLE = "MysqlStatusAndVariables" >
< filter COLUMN_NAME = "Nom_de_variable" = "EQ" OPERATOR > Binlog_cache_use < / filter >
< / GetView >
< NAME desk = "v_result" OUTER = "TRUE" >
< Table NAME = "v_binlog_cache_size" / >
< Table NAME = "v_Binlog_cache_disk_use" / >
< Table NAME = "v_Binlog_cache_use" / >
< Column NAME = "binlog_cache_size' COLUMN_NAME = 'Value' TABLE_NAME ="v_binlog_cache_size"/ >
< Column NAME = "Binlog_cache_disk_use" COLUMN_NAME = 'Value' TABLE_NAME = "v_Binlog_cache_disk_use" / >
< Column NAME = "Binlog_cache_use" COLUMN_NAME = 'Value' TABLE_NAME = "v_Binlog_cache_use" / >
< / Desk >
< / ExecutionDescriptor >
< / metric >
************************************************************************************

If I change the ExecutionDescriptor part of the code as below, is also has the same result?
************************************************************************************
< ExecutionDescriptor >
< NAME getTable = "MysqlStatusAndVariables" / >
< NAME GetView = "v_binlog_cache_size" FROM_TABLE = "MysqlStatusAndVariables" >
< filter COLUMN_NAME = "Nom_de_variable" = "EQ" OPERATOR > binlog_cache_size < / filter >
< Column NAME = "binlog_cache_size' COLUMN_NAME = 'Value' TABLE_NAME ="v_binlog_cache_size"/ >
< / GetView >
< NAME GetView = "v_Binlog_cache_disk_use" FROM_TABLE = "MysqlStatusAndVariables" >
< filter COLUMN_NAME = "Nom_de_variable" = "EQ" OPERATOR > Binlog_cache_disk_use < / filter >
< Column NAME = "Binlog_cache_disk_use" COLUMN_NAME = 'Value' TABLE_NAME = "v_Binlog_cache_disk_use" / >
< / GetView >
< NAME GetView = "v_Binlog_cache_use" FROM_TABLE = "MysqlStatusAndVariables" >
< filter COLUMN_NAME = "Nom_de_variable" = "EQ" OPERATOR > Binlog_cache_use < / filter >
< Column NAME = "Binlog_cache_use" COLUMN_NAME = 'Value' TABLE_NAME = "v_Binlog_cache_use" / >
< / GetView >
< / ExecutionDescriptor >
************************************************************************************

Thank you

Satine

Published by: Satine on April 13, 2009 19:43

Well, the metadata simply defines the metric track are structured. The call of the metric is governed by the file by default-collection (dc). So your metadata seems good to the extent of the metric system definitions are concerned; the problem arises when the current collection is started. What is the performance overhead that I referred in one of my posts more early and correction in the dc file in my previous post.

Published by: Shant on May 7, 2009 12:39

Tags: Enterprise Manager

Similar Questions

  • SQL statement for the materialized view?

    Can someone please tell me what SQL statement creates a materialized view?

    Syntactically, Yes. Otherwise Yes too (as long as you don't mind the Cartesian join with State B).
    Why not just try and see what happens?

    Concerning

    Etbin

  • What is the difference between the sql statement

    What is the difference between below sql statements, get the output of these statements

    In the test table will have 55 columns

    Select count (*) from test_table

    Select count (1) into test_table

    Select count (10) into test_table

    Select count (100) in test_table

    Select count (100000) into test_table

    Thank you

    Published by: Balajiraam on December 28, 2011 20:51

    Published by: Balajiraam on December 28, 2011 21:02

    Hello
    This will be useful for you

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:1156151916789 #25335122556076

    Kind regards
    Fame

  • What are these SQL statements?

    Hello!

    We are our applications running on Windows Server 2003 where it works fine, using Oracle via OCI 12.1.

    Now, we have the application installed on Windows Server 2012 and it works very slowly.

    When comparing these two environments trace files came a surprise: Oracle generates a lot of SQL statements when run on Windows Server 2012!  By operating on Windows2003 it only executes the SQL from the applicaton instructions.  These additional SQL statements must be the reason for the slowness, but why Oracle it generates them and how could we get arrested?

    An example:

    PARSING IN CURSOR #46985062096816 len = 210 dep = 2 uid = 0 oct = cover 3 = 0 tim = hv 1439277877325893 = ad 864012087 = "4db599f28" sqlid = "96g93hntrzjtr."

    Select / * + rule * / bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp #, sample_size, minimum, maximum, distcnt, lowval, hival, density, col #, spare1, spare2, hist_head avgcln $ where obj #=: 1 and intcol #=: 2

    END OF STMT

    ANALYSIS #46985062096816:c = 1000, e = 456, p = 0, cr = 0, cu = 0, put = 1, r = 0, dep = 2, og = 3, plh = 0, tim = 1439277877325890

    EXEC #46985062096816:c = 0, e = 498, p = 0, cr = 0, cu = 0, put = 1, r = 0, dep = 2, og = 3, plh = 2239883476, tim = 1439277877326455

    FETCH #46985062096816:c = 0, e = 56, p = 0, cr = 3, cu = 0, set = 0, r = 1, dep = 2, og = 3, plh = 2239883476, tim = 1439277877326533

    STAT #46985062096816 id = 1 cnt = 1 pid = 0 obj = op 411 = pos = 1 "TABLE ACCESS BY INDEX ROWID HIST_HEAD$ (cr = 3 pr = 0 pw = time 0 = 55 US)"

    "STAT #46985062096816 id = 2 cnt = 1 pid = 1 pos = 1 obj = op 413 ='INDEX RANGE SCAN I_HH_OBJ #_INTCOL # (cr = 2 pr = 0 pw = time 0 = 32 US)"

    OUTCOME #46985062096816:c = 0, e = 37, dep = 2, type = 3, tim = 1439277877326601

    EXEC #46985062096816:c = 0, e = 23, p = 0, cr = 0, cu = 0, set = 0, r = 0, dep = 2, og = 3, plh = 2239883476, tim = 1439277877326702

    FETCH #46985062096816:c = 0, e = 18, p = 0, cr = 3, cu = 0, set = 0, r = 1, dep = 2, og = 3, plh = 2239883476, tim = 1439277877326738

    OUTCOME #46985062096816:c = 0, e = 8, dep = 2, type = 3, tim = 1439277877326765

    EXEC #46985062096816:c = 0, e = 19, p = 0, cr = 0, cu = 0, set = 0, r = 0, dep = 2, og = 3, plh = 2239883476, tim = 1439277877326837

    FETCH #46985062096816:c = 0, e = 21, p = 0, cr = 3, cu = 0, set = 0, r = 1, dep = 2, og = 3, plh = 2239883476, tim = 1439277877326923

    OUTCOME #46985062096816:c = 0, e = 10, dep = 2, type = 3, tim = 1439277877326954

    Thank you very much in advance!

    Best regards

    Jaakko Terhonen

    Thank you all for the reply!  This time, the reason was a problem in network traffic (TCP protocol): a lot of retransmissions for a still unknown reason.  If it had nothing to do with Oracle after all.

    I cried for help here because as a common application programmer, I wasn't familiar with the Interior details of SQL analysis and after seeing it in the trace, I assumed that these strange SQL statements - which, for some reason, is appeared only in W2012-trace - were the reason for the slowness.

    Thank you, I'm a little wiser now - and I hope that many others find this thread before asking the same question!

    Best regards

    Jaakko Terhonen

  • question on the sql statement

    Hi expert,

    I have after sql statement, the function 'hiroc_get_delta_amount1' and 'hiroc_get_delta_amount2' are used separately in select and where subparagraph. These two functions are exactly the same, except that there is a log insert inside statement. for the 'hiroc_get_delta_amount1' function, newspapers are supposed to write the newspaper of table1, while for the function "hiroc_get_delta_amount2", newspapers are supposed to write the newspaper of table2. After you run this sql, I got the data loaded in the table2 newspaper, however, no data is loaded into newspaper table1.

    could you please tell me why there is no data in table2 journal for function

    1. sql statement;

    Select
    pp.policy_premium_pk,
    pp.policy_fk,
    pp.policy_term_fk,
    pp.risk_fk,
    pp.coverage_fk,
    pp.transaction_log_fk,
    pp.coverage_component_code,
    hiroc_rpt_user.hiroc_get_delta_amount1 (pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code),
    pp.rate_period_from_date
    PRODBKUPDW_MART.rmv_policy_premium pp
    where pp.rate_period_type_code = 'TERM_COVG. '
    and pp.coverage_component_code <>'NETPREM '.
    and hiroc_rpt_user.hiroc_get_delta_amount2 (pp.policy_fk, pp.policy_term_fk, pp.risk_fk, pp.coverage_fk, pp.transaction_log_fk, pp.coverage_component_code). = 0
    Pp.policy_premium_pk group,
    pp.policy_premium_pk,
    pp.policy_fk,
    pp.policy_term_fk,
    pp.risk_fk,
    pp.coverage_fk,
    pp.transaction_log_fk,
    pp.coverage_component_code,
    pp.rate_period_from_date;

    2. Insert the statement used for two functions of journal:

    (1) function "hiroc_get_delta_amount1".

    insert into HIROC_RPT_USER. Values of LOG_TEST1 (v_start, sysdate,
    p_policy_fk, p_policy_term_history_fk, p_risk_fk, p_coverage_fk, p_transaction_log_fk, p_comp_code);
    COMMIT;


    (2) function "HIROC_GET_DELTA_AMOUNT_1".

    insert into HIROC_RPT_USER. Values of LOG_ZB_TEST_1 (v_start, sysdate,
    p_policy_fk, p_policy_term_history_fk, p_risk_fk, p_coverage_fk, p_transaction_log_fk, p_comp_code);
    COMMIT;

    WRONG FORUM!

    Welcome to the forum!

    Unfortunately, you have posted on the SQL Developer forum which, as the title of the forum is NOT for questions of SQL and PL/SQL.

    Please mark this thread ANSWERED and transfer your question in the forum SQL and PL/SQL
    SQL and PL/SQL

    When repost you your question, you must provide the DDL for the two functions, not only a query in them. And unless these functions use the pragma AUTONOMOUS_TRANSACTION and VALIDATION and then inserts into a table 'log' what they do will be not permanent anyway.

    You will also need to provide the number of rows that the SELECT query returns since if no line is activated, the first function cannot even be called.

    Where this question: why are you recording of information in the context of a still SELECT query? What goal are you trying to achieve this returns the loss of performance you pay?

  • Word key missing in to_number conversion in the SQL statement select error

    ORA-00905: lack keyword for the below SQL statement error. It should be of to_number (m.EQUIP_SUB_CLASS_ID, '9999')
    between 3800 and the 3699 where Clause. Is that what I miss in the SQL below?

    SELECT  M.EQUIP_NO,M.EQUIP_CLASS_ID, M.EQUIP_DESCR,M.ORG_ID
      from  MAMIS.EQUIP M
     where M.EQUIP_NO in  (  SELECT  M.EQUIP_NO  from  MAMIS.EQUIP M, MAMIS.ORG O 
    where upper(M.ORG_ID) like upper(O.ORG_ID) 
    and length(replace(translate(M.EQUIP_SUB_CLASS_ID, '0123456789', '000000000'), '0')) is null
    and upper(M.fleet_status) like 'ACTIVE'  
    and upper(M.ORG_ID) not like 'NA'  
    and to_number(m.EQUIP_SUB_CLASS_ID , '9999') 
    between 3699 and 3800  )

    Hello

    I don't see obvious errors.

    Whenever you have a problem, please post a full test script that people can run to recreate the problem and test their ideas. Include CREATE TABLE and INSERT statements for all of the tables involved and the results desired from these data. Format your code so people can read and understand.
    See the FAQ forum {message identifier: = 9360002}

    I saw a couple of things you need to know about Oracle, but none of them would cause an error "Missing key word".

    There is no point in using the LIKE operator if you do use wildcards. For example

    upper (M.fleet_status)      like 'ACTIVE'  
    

    is slower than, but otherwise equivalent to

    upper (M.fleet_status)      = 'ACTIVE'  
    

    What are you trying to do here?

    length ( replace ( translate ( M.EQUIP_SUB_CLASS_ID
                                , '0123456789'
                        , '000000000'
                        )
               , '0'
               )
           )               is null
    

    Want to see if m.equip_sub_class_id consists only of numbers, from ' 0 'to 9'?
    If so, you can simply say

    TRANSLATE ( m.equip_sub_class_id
           , 'X0123456789'
           , 'X'
           )          IS NULL
    

    Depending on your front end, you may need a sem, i-colon (;) the end of your query.

  • How to call SQL statements in InDesign CS6?

    Hello

    My plugin needs to interact with the database and update the database of content, how do I do it, I can call the SQL statements in InDesign CS6?

    Thanku very much.

    The same way you would call them from any C++ program. You don't mention what platform, and that probably made a difference.

    I am accessing a SQL database in InDesign CS6 on Windows. I use the interface ODBC for SQL Windows database provides, through the nanodbc wrapper. I am therefore a link to odbc32.lib odbccp32.lib and including the nanodbc.cpp and nanodbc.h files. (See http://lexicalunit.github.io/nanodbc/ )

    Paul.

  • Hide results SQL - State of the button, see the

    Hello
    I use APEX 4.0 with Toad for Oracle 10.5. My problem is that I need to hide the delete button based on the results of the SQL statement. When the point: P43_DEPARTMENT_ID value is entered and there is for any field below, the data will appear along the line.
    SELECT (SELECT distinct department_id
                 FROM tbl_department
                WHERE department_id = :P43_DEPARTMENT_ID
                AND department_id IN (SELECT SUBSTR (division_id, 0, 5)
                                              FROM tbl_division))
                AS DIVISION, 
     (SELECT distinct department_id
                 FROM tbl_department
                WHERE department_id = :P43_DEPARTMENT_ID
                AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
                                              FROM tbl_grant))
                AS GRANTS,     
     (SELECT distinct department_id
                 FROM tbl_department
                WHERE department_id = :P43_DEPARTMENT_ID
                AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
                                              FROM tbl_allotment))
                AS ALLOTMENT,  
     (SELECT distinct department_id
                 FROM tbl_department
                WHERE department_id = :P43_DEPARTMENT_ID
                AND department_id IN (SELECT department_id
                                              FROM tbl_department_temp))
                AS DEPARTMENT_TEMP,
     (SELECT distinct department_id
                 FROM tbl_department
                WHERE department_id = :P43_DEPARTMENT_ID
                AND department_id IN (SELECT SUBSTR (division_id, 0, 5)
                                              FROM tbl_division_temp))
                AS DIVISION_TEMP, 
     (SELECT distinct department_id
                 FROM tbl_department
                WHERE department_id = :P43_DEPARTMENT_ID
                AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
                                              FROM tbl_grant_temp))
                AS GRANT_TEMP,     
     (SELECT distinct department_id
                 FROM tbl_department
                WHERE department_id = :P43_DEPARTMENT_ID
                AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
                                              FROM tbl_allotment_temp))
                AS ALLOTMENT_TEMP
    FROM DUAL
    But when no data appears that there is still a blank line for the fields. That will make the hidden Delete button. I don't know how to remove this row of the grid with my results of the select statement above. The State still thinks there is a line and a value (s) appear statement.
    DIVISION OF | GRANTS | ALLOTMENT | DEPARTMENT_TEMP | DIVISION_TEMP | GRANT_TEMP | ALLOTMENT_TEMP
    ________|_______ |___________|__________________|_____________ |____________|_________________
    Can someone help me with my select statement or provide me with advice on how to remove this blank line when there is no data? I can't create a view and then add a WHERE IS NOT NULL clause because of the variable binding: P43_DEPARTMENT_ID.

    Do not know if I just got it, but what about:

    SELECT SELECT (separate department_id
    OF tbl_department
    WHERE department_id =: P43_DEPARTMENT_ID
    AND department_id IN (SELECT SUBSTR (division_id, 0, 5)
    OF tbl_division))
    THE DIVISION,
    SELECT (separate department_id
    OF tbl_department
    WHERE department_id =: P43_DEPARTMENT_ID
    AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
    OF tbl_grant))
    FORM OF GRANTS,
    SELECT (separate department_id
    OF tbl_department
    WHERE department_id =: P43_DEPARTMENT_ID
    AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
    OF tbl_allotment))
    AS ASSIGNMENT,.
    SELECT (separate department_id
    OF tbl_department
    WHERE department_id =: P43_DEPARTMENT_ID
    AND department_id IN (SELECT department_id
    OF tbl_department_temp))
    AS DEPARTMENT_TEMP,
    SELECT (separate department_id
    OF tbl_department
    WHERE department_id =: P43_DEPARTMENT_ID
    AND department_id IN (SELECT SUBSTR (division_id, 0, 5)
    OF tbl_division_temp))
    AS DIVISION_TEMP,
    SELECT (separate department_id
    OF tbl_department
    WHERE department_id =: P43_DEPARTMENT_ID
    AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
    OF tbl_grant_temp))
    AS GRANT_TEMP,
    SELECT (separate department_id
    OF tbl_department
    WHERE department_id =: P43_DEPARTMENT_ID
    AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
    OF tbl_allotment_temp))
    AS ALLOTMENT_TEMP
    OF THE DOUBLE
    LESS
    SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL from double

    This should ensure you don't receive a "no data found" when all the columns return null.

  • Tuning sql of a product to the seller without changing the sql statement

    Hello

    We have a product of the provider that generates the SQL statement. For a query, we get the answer in 15 seconds. But users are asking if we can bring it back to 5 seconds. Limitation is the query can not be changed. He used about 10 to 12 tables and bit complex query.

    What kind of options could be evaluated if we are to improve the performance of a query (not sure if she could never be reduced to 5 seconds)
    without making any change to the query.

    Database Version: Oracle 10.2.0.4

    Thank you
    Delphine

    Hello

    http://www.Oracle-base.com/articles/10G/AutomaticSQLTuning10g.php

    your software is enterprise or standard?

    Tuning Pack & pack diagnosis are extra cost option with the standard edition.

    & the useful note * automatic SQL Tuning - SQL [271196.1 ID] profiles *.

    http://www.Oracle.com/us/corporate/pricing/technology-price-list-070617.PDF

    Thank you

    Published by: CKPT November 5, 2010 11:12

  • Question of SQL statement

    I have this PreExpression at a stage of SQL statement:

    Locals.SQL_LatestResult = "SELECT UUT_RESULT.ID, UUT_RESULT. UUT_SERIAL_NUMBER, UUT_RESULT. START_DATE_TIME UUT_RESULT WHERE (((UUT_RESULT. UUT_SERIAL_NUMBER) =------"' + Locals.serial + ' \ ') AND ((UUT_RESULT." START_DATE_TIME) = (SELECT MAX (UUT_RESULT2. START_DATE_TIME) OF UUT_RESULT AS UUT_RESULT2 WHERE UUT_RESULT. UUT_SERIAL_NUMBER = UUT_RESULT2. UUT_SERIAL_NUMBER))); »

    Locals.SQL_LatestResult has this value after the PreExpression:

    SELECT UUT_RESULT.ID, UUT_RESULT. UUT_SERIAL_NUMBER, UUT_RESULT. START_DATE_TIME UUT_RESULT WHERE (((UUT_RESULT. UUT_SERIAL_NUMBER) = "15514011") AND ((UUT_RESULT. START_DATE_TIME) = (SELECT MAX (UUT_RESULT2. START_DATE_TIME) OF UUT_RESULT AS UUT_RESULT2 WHERE UUT_RESULT. UUT_SERIAL_NUMBER = UUT_RESULT2. UUT_SERIAL_NUMBER)));

    I get the number of records = 0, if I run the sequence.

    If I copy the exact same SQL query in access I get what I want to know a record.

    If I remove that part of the query:

    ((UUT_RESULT. UUT_SERIAL_NUMBER) =------"" + Locals.serial + "\") "

    I get 388 records which is correct and it run directly in access.

    What's not here?

    I was too fast for this post... it's my fault, the database link was wrong, so data were there...

    Statements are very good!

  • Several SQL statements with zero executions in the region of SQL

    Hello

    one of my databases has a large number of statements in the SQL box with zero executions. Some of them analyzed several times without a single run. Why the database stores these statements and how to avoid or reduce them?

    My problem is that the only time or zero time sql statements take the largest part of the area of sql:

    -sql statement and only once and without executing sql statements

    Select

    Count (1) num_sql_total,.

    sum (decode (executions, 1, 1, 0)) num_one_use_sql,.

    sum (decode (executions, 0, 1, 0)) num_no_use_sql,.

    Sum (RUNTIME_MEM) / 1024/1024 mb_used,.

    sum (decode (executions, sharable_mem, 1, 0)) / 1024/1024 mb_for_one_use_sql,.

    sum (decode (executions, 0, sharable_mem, 0)) / 1024/1024 mb_for_no_use_sql

    Of

    GV$ sqlarea

    where

    RUNTIME_MEM > 0;

    NUM_SQL_TOTAL NUM_ONE_USE_SQL NUM_NO_USE_SQL MB_USED MB_FOR_ONE_USE_SQL MB_FOR_NO_USE_SQL

    23318

    8739

    8027

    1420,95619106293

    381,41183757782

    530,999855041504

    Concerning

    Thomas

    This is not unusual. Another app could analyze for example hard the most often used SQLs in upstairs app - making benefit of further processing (in theory) of sweet analysis when you use these SQLs.

    In fact, I remember reading something to this effect as a performance for some factor or another Oracle document or note?

    So unless you have serious questions of shared pool, why bother with these sliders? What would be the problem?

  • Order of execution of SQL statements

    Hello

    I have two SQL statements where the first statement executes on a table with more than 40 million lines, the second statement is running on a table more 6 million lines.  When they are running their own each take about 0.15 seconds to run, but when combined they take 20 minutes to run, (the second SQL statement is inserted in the WHERE clause of the statement of first).  It would seem that after combining these statements, the first statement goes through all 40 million lines before it performs the SELECT in the WHERE clause.  I think that what is necessary is to ensure the SELECT in the WHERE clause is executed first... or something like that!  Anyone has any ideas on how to combine these statements but not suffer from the performance impact?

    The first statement is:

    Select csi.instance_id,

    OEL.ordered_item

    of apps.csi_item_instances csi,.

    Apps.oe_order_lines_all oel

    where csi.instance_id in

    (1718000,3698000,48740202)

    and csi.last_oe_order_line_id = oel.line_id;

    The second statement is:

    Select / * + INDEX (IEA (attribute_id)) * /.

    IEA.instance_id

    apps.csi_iea_values do

    where iea.attribute_id = 10004

    and iea.attribute_value is not null;

    The joint return is:

    Select csi.instance_id,

    OEL.ordered_item

    of apps.csi_item_instances csi,.

    Apps.oe_order_lines_all oel

    where csi.instance_id in

    (select / * + INDEX (IEA (attribute_id)) * /)

    IEA.instance_id

    apps.csi_iea_values do

    where iea.attribute_id = 10004

    and iea.attribute_value is not null)

    and csi.last_oe_order_line_id = oel.line_id;

    Thanks for any help,

    Mike

    Your subquery returns probably just two values that you did originally as constants - but the optimizer thinks that you're going to get 564 K lines.  This is why the indicator for the simple query has a beneficial effect, it forces the Oracle to use an index when it would otherwise make a search.

    When the subquery is incorporated, however, the optimizer uses its cardinality expected to decide whether to use a nested loop join or the hash join to CSI_ITEM_INSTANCES, since the large enough estimate, he uses the hash with a join analysis complete.  That's why I pointed out that the fact to tell the optimizer to how many lines outside the subquery should make a difference.

    Have you tried the "common table expression" approach, rather than approach no_merge, but it would not help because it does not change the optimizer for cardinality estimate.  If you want to repeat the method CTE adding boards / * + materialize cardinality (2) * / to the query in the WITH clause, you should get the desired result.

    Concerning

    Jonathan Lewis

  • error in pseudo-column "DECODE" can be used within an SQL statement

    Hi gurus,

    Your help is grealty appreciated. Please help me.


    I'm trying to see if I can use the function decode as below and get the error, here below vPlatformfrom value would be QA or MTS


    vDataBase1 :='@'|| Decode (vPlatformfrom, 'STD', 'STD', 'QA', 'QA')


    Before we check function NVL to a single platform, but now we need the database based on the platform is here.

    -vDataBase1 :='@'|| NVL (vPlatformto, 'MTS');

    Error:

    PLS-00204: pseudo-column "DECODE" or function may be used within an SQL statement

    > So, here, instead of the decode function, I can use this case as below:

    Well... you can, but why?  In your CASE, you simply return the same value as the variable.

    You might as well use: vDataBase1: = vPlatformfrom;  It would reach exactly the same thing.

    If vPlatformfrom can be a null value, you will need to decide what database to use or an exception.  I think you're original code (NVL) were probably more correct, but I can't decide which.

    (and don't bother selecting double, it is an unnecessary sql statement which must be analysed, etc..)

  • Vo SQL statement will not use aliases

    Hello!

    When I tried to enter the following code in the SQL statement in my definition of VO, it gave me an error in column ambiguously defined:

    SELECT a.PERSON_ID,

    a.EFFECTIVE_START_DATE,

    a.EFFECTIVE_END_DATE,

    a.EFFECTIVE_START_DATE,

    a.EFFECTIVE_END_DATE,

    a.EMPLOYEE_NUMBER,

    a.FULL_NAME

    OF PER_ALL_PEOPLE_F one

    I need to put an alias because I need to refer to one of its columns inside the place where the condition. What is supposed to be the right way to set it?

    Thank you.

    whatever the dynamic where clause you add with setwhereclause, it is added on top of the query you mentioned in the original Version, so your alias doesn't work

    Now if you look at the care of error fully you can see you are querying VO got closed in support () and another alias has been given by the framework (OAF) so all adding the whereclause by setwherelcause dynamically delete pls the 'a'., of the Sub statement

    setWhereClause ("a.employee_number =: 1 and a.effective_end_date = (select max (effective_end_date) in the per_all_people_f where employee_number = a.employee_number) '");

    ratther write like

    setWhereClause ("employee_number =: 1 and effective_end_date = (select max (effective_end_date) in the per_all_people_f b where b.employee_number =: 2)" ");

    setWhereClauseParams (null); Always reset

    setWhereClauseParam (0, EmpNumber);

    setWhereClauseParam (1, EmpNumber);

    I hope that is clear, if not please let me know.

    Kind regards

    Hemant

  • Cannot display the results to the database during "Update": SQL statement

    Hello

    I get this error trying to update a VO via the UI or BCBrowser.

    Cannot display the results to the database during "Update": SQL statement

    This is a default single front & right THAT VO creates on the object of the entity (Database Table)

    On the same table and with the same credentials of DB, I could update the record.

    Any guess on what went wrong?

    Thanks in advance for any help.

    p.s Jdev 11.1.1.6

    Journal:

    oracle.jbo.DMLException: Houston-26041: could not publish data from database in "Update": SQL statement "START the CAR UPDATED CarEO SET SEL_ITEM =: 1 WHERE TXN_NO =: 2 AND LOGID =: AND SEQNO = 3: 4 POLL DELIVERY_MODE, CERTIFICATION_REQ, SOFT_COPY_IND, SELITEM IN: 5,: 6,: 7,: 8; END; ».

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:583)

    at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)

    at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)

    at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)

    at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)

    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)

    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)

    at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)

    at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)

    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)

    at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)

    at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)

    at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)

    to oracle.jbo.uicli.controls.JUNavigationBar$ NavButton.actionPerformed (JUNavigationBar.java:118)

    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

    in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)

    at java.awt.Component.processMouseEvent(Component.java:6289)

    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

    at java.awt.Component.processEvent(Component.java:6054)

    at java.awt.Container.processEvent(Container.java:2041)

    at java.awt.Component.dispatchEventImpl(Component.java:4652)

    at java.awt.Container.dispatchEventImpl(Container.java:2099)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

    at java.awt.Container.dispatchEventImpl(Container.java:2085)

    at java.awt.Window.dispatchEventImpl(Window.java:2478)

    at java.awt.Component.dispatchEvent(Component.java:4482)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)

    to java.awt.EventQueue.access$ 000 (EventQueue.java:85)

    in java.awt.EventQueue$ 1.run(EventQueue.java:603)

    in java.awt.EventQueue$ 1.run(EventQueue.java:601)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)

    in java.awt.EventQueue$ 2.run(EventQueue.java:617)

    in java.awt.EventQueue$ 2.run(EventQueue.java:615)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Caused by: java.sql.SQLException: invalid column type

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterInternal(OracleCallableStatement.java:150)

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:399)

    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:581)

    at oracle.jdbc.driver.OracleCallableStatementWrapper.registerOutParameter(OracleCallableStatementWrapper.java:1765)

    at oracle.jbo.server.OracleSQLBuilderImpl.bindUpdateStatement(OracleSQLBuilderImpl.java:2243)

    at oracle.jbo.server.EntityImpl.bindDMLStatement(EntityImpl.java:10524)

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:412)

    ... 52 more

    The problem is solved now.

    new columns added to the database table, after the creation of the entity object. Those changes were not picked up in the entity object.

    I found this difference after object entity with the DB Table comparison.

    And when I added these new columns to EO & VO, I don't get this error more.

    Thanks to all who tried to help

Maybe you are looking for