Explain Plan not showing correct results.

Hi Gurus,
Please help me to understand below issue.
Whenever I am doing explain plan on any of the sql statements it says as explained but when retriving the explain plan output it shows same results again and again.
DB - 11gR2 Stand alone
ASM - Configured.
OS - RHEL 6.2.
SQL> select count(*) from t2114;
COUNT(*)
639292
SQL> explain plan for select count(*) from t2114;
Explained.
SQL> @?/rdbms/admin/utlxpls.sql
PLAN_TABLE_OUTPUT
Plan hash value: 1497650422
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 6634 | 524K| 2993 (19)| 00:00:01 |
| 1 | SORT ORDER BY | | 6634 | 524K| 2993 (19)| 00:00:01 |
| 2 | TABLE ACCESS BY INDEX ROWID| T2210 | 6634 | 524K| 2947 (17)| 00:00:01 |
|* 3 | INDEX RANGE SCAN | T2210_T | 6842 | | 108 (22)| 00:00:01 |
Predicate Information (identified by operation id):
3 - access("T2210"."C490008000"=:SYS_B_0 AND "T2210"."C490009100"=:SYS_B_2
AND "T2210"."C301363300"=TO_NUMBER(:SYS_B_1))
16 rows selected.
SQL> explain plan for
2 SELECT T2114.C1 FROM T2114 WHERE ((T2114.C1000000001 = :"SYS_B_0") AND (T2114.C536871442 = :"SYS_B_1") AND (T2114.C536871477 = :"SYS_B_2") AND ((:"SYS_B_3" - T2114.C3) >= :"SYS_B_4") AND ((:"SYS_B_5" - T2114.C3) <= :"SYS_B_6") AND (T2114.C1000000217 LIKE :"SYS_B_7") AND (T2114.C536871478 < :"SYS_B_8")) ORDER BY C1000000161 DESC, :"SYS_B_9" ASC;
Explained.
SQL> SELECT * FROM TABLE(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 1497650422
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 6634 | 524K| 2993 (19)| 00:00:01 |
| 1 | SORT ORDER BY | | 6634 | 524K| 2993 (19)| 00:00:01 |
| 2 | TABLE ACCESS BY INDEX ROWID| T2210 | 6634 | 524K| 2947 (17)| 00:00:01 |
|* 3 | INDEX RANGE SCAN | T2210_T | 6842 | | 108 (22)| 00:00:01 |
Predicate Information (identified by operation id):
3 - access("T2210"."C490008000"=:SYS_B_0 AND "T2210"."C490009100"=:SYS_B_2
AND "T2210"."C301363300"=TO_NUMBER(:SYS_B_1))
16 rows selected.

Hi Dom,
Thanks for your immediate response.
I am getting two values for PLAN_TABLE. Please let me know if we need to drop any of them??
SQL> SELECT *
FROM all_objects
WHERE object_name = 'PLAN_TABLE'; 2 3
OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS T G S NAMESPACE EDITION_NAME
PUBLIC PLAN_TABLE 5127 SYNONYM 17-SEP-11 17-SEP-11 2011-09-17:09:47:47 VALID N N N 1
ARADMIN PLAN_TABLE 219426 219426 TABLE 07-APR-13 07-APR-13 2013-04-07:23:01:12 VALID N N N 1

Similar Messages

  • Why the content of the Explain Plan not show out?

    Why the content of the Explain Plan not show out?
    I am using Oracle 11g.
    I already ran the utlxplan.sql sctipt and I also set serveroutput on.
    SQL> set autotrace on
    SQL> EXPLAIN PLAN FOR SELECT*FROM DEMO_TABLE WHERE OWNER='HR';
    Explained.
    Elapsed: 00:00:00.67

    When you say:
    My release 10.2 database display the Explain Plan automatically.
    How to make 11.1.0.6 Oracle database to display the Explain Plan automatically.What do you mean? Specifically, what commands are you executing in the 10.2 database, that displays the execution plan "automatically"?
    Are you saying that if you execute the same command in 11.1.0.6, you don't get a similar result? What happens? Do you get an error?
    For both the 10.2 case and the 11.1.0.6 case, post the full output of the commands you're executing, and the result you are seeing.
    Then, maybe someone can help you.
    When you post the output, please encapsulate it in a pair "code" tags, which is the word "code" without the quotes, surrounded by a pair of curly braces {}.
    When you do this correctly, the output looks like:
    This is output from my execution plan run.and is much easier to read.
    Don't be afraid to use the preview tab to see if your message will be posted with the correct formatting.
    -Mark

  • VL06I Inbound delivery monitor not showing correct results

    Dears,
    We are creating inbound deliveries on the basis of POs and creating GR via MIGO after eliminating movement type in line item catageory by using SPRO. For monitoring we would like to use VL06I but its not showing correct results.
    Can anyone guid me ?
    Regards,
    FR

    You can list all Inbound Deliveries by selecting "List Inbound Deliveries"  Tab in VL06I
    May be if you can little elaborate the issue

  • Aggregation not showing correct results in 10g

    Hi,
    We have created a calculated column in BMM layer as x=Sum(Amount)/sum(Distinct Members).
    In the report, individually it is showing correct results but when we are calculating "Total By" it is showing wrong total.This is because of while calculating totals it is taking the formula as x=Sum(Amount)/sum(Members).
    Aggregations are kept as default for all the columns in the report .
    Please help me to solve this issue.

    For this calculated column set aggregation level as sum.

  • Log application query not showing correct results

    Hi,
    We are running Dataguard (DG) in our production environment. EBS 11.5.10.2 and DB 10.2.0.4.
    Every morning we run the following query on both primary and standby to confirm that the logs are being transported and applied to the standby:
    select sequence#,applied,to_char(first_time,'mm/dd/yy hh24:mi:ss') first from v$archived_log order by first_time;
    Once the logs are transported and applied, a response of 'Yes' is returned for each log generated. We have noticed within the last week that when we run the query on primary, 'No' is being returned, but on standby, 'Yes' is returned. I have confirmed that standby is reflecting the correct results. I've tried restarting the DG service (alter database recover managed standby....) in an attempt to have primary 'refresh' itself but that didn't work.
    Does anyone have any idea why primary keeps returning 'No' to the query, and how we can get it to reflect to correct results?
    Thanks,
    Lia.

    Hi Werner,
    Thanks for your response. Given what you're saying I find that a little strange since prior to this, the query would return a value of 'YES' on the primary. Actually, to be exact, on the primary, each log would should up twice. One would show 'NO' and the other 'YES'- the second indicating transporting and shipping was successful.
    This is how the results were before:
    SEQUENCE   APP   FIRST
    +154623 NO 04/07/09 08:03:22+
    +154623 YES 04/07/09 08:03:22+
    +154624 NO 04/07/09 08:05:27+
    +154624 YES 04/07/09 08:05:27+
    This is how the results are now:
    SEQUENCE   APP   FIRST
    +154754 NO 04/22/09 07:22:22+
    +154754 NO 04/22/09 07:22:22+
    +154755 NO 04/22/09 07:25:27+
    +154755 NO 04/22/09 07:25:27+
    I'm not doubting that what you're saying is correct, it just adds an element of confusion for me...
    Lia.

  • CKF not showing correct results in BEx Analyzer

    Dear Friends,
    I am getting different results when viewed from BEx Analyzer and Web Analyzer for the same query. BEx Analyzer shows incorrect results. The column that is showing different is a local formula (say Formula3) that is a result of dividing Formula1 by Formula2.
    BEx Web calculates Formula3 correctly while BEx analyzer does not.
    I am in BI 7.0 SP 10.
    Any Clues?
    Thanks
    Viren

    For this calculated column set aggregation level as sum.

  • Inventory Non cumulative values are not showing correct result

    Hi Guys,
    I have created a report on Inventory cube taking material in rows and 0T0TALSTCK and 0VALSTCKVAL in colums and i created a variable on calender day . What ever the date if we give we will get the quantity and value as on that date.
    Here Quantity is showing perfectly and in case of value it is showing wrongly. In this case the interesting thing is if we substract the  (Reciet value - Issue ) value then i am getting the correct value.
    Some times Even quantity is zero the noncumulative keyfigure (0VALSTCKVAL)is not showing zero it is showing some value but if i do (Reciet value - Issue ) it will show correctly.
    Please help on this issue.
    Thanks & Regards
    K.Srinivas

    Hi,
    when the quantity is correct, then you have a problem with the values. You have loaded the infocube correcly.
    check your keyfigures and the transformation with the BI content.
    => for example: do you have the coding in the BF transformation?
    * see OSS note 571669
        LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.
          IF <SOURCE_FIELDS>-stockcat EQ 'V' OR
             <SOURCE_FIELDS>-stocktype EQ 'V'.
            DELETE SOURCE_PACKAGE.
          ENDIF.
        ENDLOOP.
    => you have used the datasource 2LIS_03_UM. There are no quantities. Is there your problem.
    Sven

  • EXPLAIN PLAN not showing no of records

    Rows column in the TKPROF output shows zero columns. The same works fine at sqlplus level, when autotrace set to ON.
    Explain plan looks like below:
    Rows Execution Plan
    0 SELECT STATEMENT GOAL: ALL_ROWS
    0 WINDOW (SORT)
    0 HASH (GROUP BY)
    0 MAT_VIEW ACCESS (BY INDEX ROWID) OF 'FII_AR_NET_REC_BASE_MV'
    (MAT_VIEW)
    0 NESTED LOOPS
    0 MERGE JOIN (CARTESIAN)
    0 TABLE ACCESS (FULL) OF 'FII_AR_SUMMARY_GT' (TABLE
    (TEMP))
    0 BUFFER (SORT)
    0 INLIST ITERATOR
    0 TABLE ACCESS GOAL: ANALYZED (BY INDEX ROWID) OF
    'FII_TIME_STRUCTURES' (TABLE)
    Can someone help me here ?
    Thanks.

    Hi,
    it's becuz of when u execute query twice its no I/O .data are already in buffer pool.
    Thanks
    Reena

  • Report not showing correct results

    I am new to SSRS.  Using SQL 2008, Visual Studio 2010 shell.
    I have a stored procedure that when I execute it through SSMS, it returns the correct results.  However, when my report runs through SSRS (using the same stored procedure).  I get inconsistent results.
    I've been able to narrow it down to a specific parameter in my report where I pass in Id's.  This particular parameter gets its values from a query and is setup to use multiple values.  I have focused on two ID's which together are giving
    me problems. 
    The IDs are !'" and
    !!T.
    When I ONLY select !'" the report returns the correct results.
    When I ONLY select !!T the report return the correct results.
    When I select !'" and !!T the report only return the results for !!T.
    I have no clue why SSRS doesn't like this.  Any help would be appreciated.
    jhoop

    I created the specific function referenced in your link and it didn't help.
    Function
    CREATE FUNCTION [dbo].[c__SplitValues]
    -- Add the parameters for the function here
    @List nvarchar(2000)
    ,@SplitOn nvarchar(2000)
    RETURNS
    @RtnValue TABLE
    -- Add the column definitions for the TABLE variable here
    Id int identity(1,1)
    ,Value nvarchar(100)
    AS
    BEGIN
    -- Fill the table variable with the rows for your result set
    While(CHARINDEX(@SplitOn, @List) > 0)
    BEGIN
    INSERT INTO @RtnValue (value)
    SELECT
    VALUE = LTRIM(RTRIM(SUBSTRING(@List, 1, CHARINDEX(@SplitOn, @List) - 1)))
    SET @List = SUBSTRING(@List, CHARINDEX(@SplitOn, @List) + LEN(@SplitOn), LEN(@List))
    END
    INSERT INTO @RtnValue (Value)
    SELECT Value = LTRIM(RTRIM(@List))
    RETURN
    END
    The line in my SQL statement where I use this function
    AND TableName.UserId IN (SELECT Value FROM dbo.c__SplitValues(@UserId,','))
    jhoop

  • Search on Keyword not showing correct results

    I tagged all 5k of my images keywords. Basically people's names of who is in the image.
    I then ran a search by person's name, but a lot of the results do not contain the keyword I searched for.
    In the results I checked the metadata tab under Keywords: and my search term is not listed.
    Am I missing something?
    thanks

    Yes, I added the keywords using 'Batch Change....'
    The Keyword HUD shows all my keywords listed right there at the root. ie. My keywords are not under any other keywords. ie. iPhoto/Raw or Personal/Backyard
    Ta

  • Set in Excel using ORDER MDX statement not showing correct results on PowerPivot model

    I have defined a set in Excel 2013 with this syntax: 
    order(Topcount([Company].[Company].[Company].members,
    10,
    [Measures].[Sum of TotalValue]),[Measures].[Sum of TotalValue]
    ,DESC)
    The order statements is not properly Applied. Order by name is still active. Would appreciate your help, if have I done something wrong or is this a bug?

    Ok in the meantime I have solved this myself. In the field settings is an option for "Automatically order and remove duplicates..." which is turned on by default and overrules specific order statements in the set. I am not quite sure why but as long as
    you know about it, this can be addressed by turning off.

  • ADF Query not showing correct search results.

    Hi,
    I am using normal ADF af:query to search data using a VO Criteria.
    We have modified the getter of searched column in VORowImpl java class to return values based on NLSID search from cache.
    Logic in getter:
    If for a column_name nlsid is present then show data as the value of nlsid.
    Suppose Initially:
    column_name = "Column1"
    column_name_nlsid="Column1_nlsid"
    column_name_nlsid_value="Column1_nlsid_value"
    The table will show:
    column_name: "Column1_nlsid_value"
    if we search "Column1" as column_name, The Search will also show:
    column_name: "Column1_nlsid_value"
    in results
    But,
    If we modify the nlsid value as:
    column_name_nlsid_value="Column1_nlsid_value_MODIFIED"
    Then
    The table will show:
    column_name: "Column1_nlsid_value_MODIFIED"
    if we search "MODIFIED" in column_name, The Search will NOT show any results
    So, it seems to me that the af:query search always searches upon the values derived from InternalAttribute values.
    What can i do to over-ride such behaviour , so that the search also takes the data from modified getters.

    Try posting in Jdeveloper Forum JDeveloper and ADF which has more audience

  • Why this query does not show the result?

    Why the query with the schema prefixed does not show the result and the query without schema display the correct results?
    SQL> select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS';
    select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS'
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select data_object_id,object_type from dba_objects where object_name='HR.JOBS';
    no rows selected
    SQL> select data_object_id, OWNER, object_type from dba_objects where object_name='JOBS';
    DATA_OBJECT_ID     OWNER                          OBJECT_TYPE
    69662              HR                                 TABLE
                       OE                                 SYNONYM
    SQL> SELECT USER FROM DUAL;
    USER
    SYS

    Hi,
    the column object_name refers to a object_name which is 'JOBS', the column owner refers to the owner 'HR', the value isn't stored together, so you have to select the two columns. It is the same behaviour as every other table/view. Have a look at the values in the view DBA_OBJECTS.
    Herald ten Dam
    Superconsult.nl

  • Hi when i run this in toad for explain plan  its showing an error ORA_22905

    hi when i run this query in toad for explain plan its showing an error ORA_22905 cannot accesss rows from an non nested table item can anyone help me out
    SELECT
    DISTINCT SERVICE_TBL.SERVICE_ID , SERVICE_TBL.CON_TYPE, SERVICE_TBL.S_DESC || '(' || SERVICE_TBL.CON_TYPE || ')' AS SERVICE_DESC ,SERVICE_TBL.CON_STAT
    FROM
    TABLE(:B1 )SERVICE_TBL
    WHERE
    CON_NUM = :B2
    thanks

    Note the name of this forum is SQL Developer *(Not for general SQL/PLSQL questions)* (so for issues with the SQL Developer tool). Please post these questions under the dedicated SQL And PL/SQL forum.
    Regards,
    K.

  • Explain plan not available in dba studio

    Hi, guys,
    Why the explain plan not available in my dba studio with a message like this "explain plan not available for this sql statement. ora-02195: attempt to create permanent object in a temporary tablespace"
    Another question: I can use "set autotrace on" to trace sql statement in sql*plus window. But the final execution plan come up without those thing like cost, cardinality but only the steps
    Thanks for your help
    jim

    Was this a trace started on an already running task? Was the trace stopped before the task completed? Did the trace file reach its set size limit before the task compled?
    In all three cases above you would have cursors that were not closed and stats information not written to the trace file resulting in incomplete data for some SQL.
    HTH -- Mark D Powell --

Maybe you are looking for

  • Nav bar problems; please help.

    Home Birthday Anniversary For Her For Him For Mom For Dad Just Because Making Up Can anyone help?  This is the html for my nav bar, but when I "view in browser" I get a cannot display page message.

  • Fresh install FORMS DO NOT LAUNCH on the new clone

    Dears, EBS:12.0.4 RDBMS:10.0.2 OS:UNIX-AIX i just create a new clone for my APPS,but i have this error if i open any page: oracle.forms.net.ConnectionException: Forms session <3> failed during startup: no response from runtime process      at oracle.

  • A question on ODI Performence

    Guys, Iam loading the data from AS/400 TO ORACLE Using ODI interface. Iam using LKM SQL TO ORACLE AND IKM SQL CONTROL APPEND. I have set the array fetch size and Batch update size to 200 and ODI_INIT_HEAP=256m ODI_MAX_HEAP=4096m Iam trying to load 4.

  • "find" process"

    What does the "find" process do? Spotlight isn't indexing nor are time machine or idisk doing anything at the time, but "find" is using 75% of CPU. I had opened up Activity Monitor to look at something else and found the find process using up 75% of

  • Help needed with report grouping

    Post Author: David Waugh CA Forum: General I have a summary report that has three groupings - The groupings areas follow: Partner Group (Group1)Client Group (Group2)Actual Client (Group3) For instance, there are 9 Partners, and each Client Group can/