Why plan table showing 1 rec

SQL> CREATE TABLE A (ID NUMBER)
2 /
Table created.
SQL> EXPLAIN PLAN FOR SELECT * FROM A
2 /
Explained.
SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY)
2 /
PLAN_TABLE_OUTPUT
Plan hash value: 1222032187
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 13 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| A | 1 | 13 | 2 (0)| 00:00:01 |
Note
PLAN_TABLE_OUTPUT
- dynamic sampling used for this statement
12 rows selected.
why plan table showing one record when i have no record in table a.
regards

This is because you did not analyze the table, and if it was analyzed, it maps a zero to a one. Please not that my test is not in 10g but on 9iR2, where non analyzed tables have null values in their estimated cardinalities.
SQL> create table a (id number)
  2  /
Tabel is aangemaakt.
SQL> explain plan for select * from a
  2  /
Uitleg is gegeven.
SQL> select * from table(dbms_xplan.display)
  2  /
PLAN_TABLE_OUTPUT
| Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
|   0 | SELECT STATEMENT     |             |       |       |       |
|   1 |  TABLE ACCESS FULL   | A           |       |       |       |
Note: rule based optimization
9 rijen zijn geselecteerd.
SQL> exec dbms_lock.sleep(1)
PL/SQL-procedure is geslaagd.
SQL> insert into a values (1)
  2  /
1 rij is aangemaakt.
SQL> explain plan for select * from a
  2  /
Uitleg is gegeven.
SQL> select * from table(dbms_xplan.display)
  2  /
PLAN_TABLE_OUTPUT
| Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
|   0 | SELECT STATEMENT     |             |       |       |       |
|   1 |  TABLE ACCESS FULL   | A           |       |       |       |
Note: rule based optimization
9 rijen zijn geselecteerd.
SQL> exec dbms_lock.sleep(1)
PL/SQL-procedure is geslaagd.
SQL> insert into a select level from dual connect by level <= 9
  2  /
9 rijen zijn aangemaakt.
SQL> explain plan for select * from a
  2  /
Uitleg is gegeven.
SQL> select * from table(dbms_xplan.display)
  2  /
PLAN_TABLE_OUTPUT
| Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
|   0 | SELECT STATEMENT     |             |       |       |       |
|   1 |  TABLE ACCESS FULL   | A           |       |       |       |
Note: rule based optimization
9 rijen zijn geselecteerd.
SQL> exec dbms_lock.sleep(1)
PL/SQL-procedure is geslaagd.
SQL> truncate table a
  2  /
Tabel is afgekapt.
SQL> exec dbms_stats.gather_table_stats(user,'A')
PL/SQL-procedure is geslaagd.
SQL> explain plan for select * from a
  2  /
Uitleg is gegeven.
SQL> select * from table(dbms_xplan.display)
  2  /
PLAN_TABLE_OUTPUT
| Id  | Operation            |  Name       | Rows  | Bytes | Cost (%CPU)|
|   0 | SELECT STATEMENT     |             |     1 |    13 |     3  (34)|
|   1 |  TABLE ACCESS FULL   | A           |     1 |    13 |     3  (34)|
7 rijen zijn geselecteerd.
SQL> exec dbms_lock.sleep(1)
PL/SQL-procedure is geslaagd.
SQL> insert into a values (1)
  2  /
1 rij is aangemaakt.
SQL> exec dbms_stats.gather_table_stats(user,'A')
PL/SQL-procedure is geslaagd.
SQL> explain plan for select * from a
  2  /
Uitleg is gegeven.
SQL> select * from table(dbms_xplan.display)
  2  /
PLAN_TABLE_OUTPUT
| Id  | Operation            |  Name       | Rows  | Bytes | Cost (%CPU)|
|   0 | SELECT STATEMENT     |             |     1 |     3 |     3  (34)|
|   1 |  TABLE ACCESS FULL   | A           |     1 |     3 |     3  (34)|
7 rijen zijn geselecteerd.
SQL> exec dbms_lock.sleep(1)
PL/SQL-procedure is geslaagd.
SQL> insert into a select level from dual connect by level <= 9
  2  /
9 rijen zijn aangemaakt.
SQL> exec dbms_stats.gather_table_stats(user,'A')
PL/SQL-procedure is geslaagd.
SQL> explain plan for select * from a
  2  /
Uitleg is gegeven.
SQL> select * from table(dbms_xplan.display)
  2  /
PLAN_TABLE_OUTPUT
| Id  | Operation            |  Name       | Rows  | Bytes | Cost (%CPU)|
|   0 | SELECT STATEMENT     |             |    10 |    30 |     3  (34)|
|   1 |  TABLE ACCESS FULL   | A           |    10 |    30 |     3  (34)|
7 rijen zijn geselecteerd.Regards,
Rob.

Similar Messages

  • Graphical Planning Table can show quantity?

    Dear all,
    I am using Graphical Planning Table (MF50), the graphic shows the planned order number for each Material.
    How can the graphic show the quantity for each Materials?
    Pls help me to configure it.
    Thank you very much!
    Cao Huy

    Hi Huy Cao,
    why not to show the order QTY in the table section of the chart for each material? you could create a layout key containing the field GSMNG-PLAF and assign it to the layout of the charts - dispatched and pool via OPDJ.
    Cheers,
    Mao

  • 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

  • Modifications in Planning tables

    Hi,
    On one of our project, we need to add an UDA on some members of a Planning application. We decided to go with an insert of data in the table “HSP_MEMBER_TO_UDA”, with the right MEMBER_ID from “HSP_OBJECT” and the right UDA_ID from “HSP_UDA”. It works perfectly, the table was modified, the data were correct but the modification didn’t show in planning when trying to retrieve information for theses members … After some times, it finally shows in Planning.
    My question is : Is there a buffer used by planning while retrieving data from tables ? Why is there a lag between the content of tables and the information displayed in Planning ?
    Thanks in advance for your answers :)
    Frédéric

    Hi John,
    You are right, we could have used outlineload to update the members.
    The full story is that our client need to be able to send specific data from an application to another. So, we develloped a webform in which he can flag the member he want to extract, we export the list of these flagged members (dataexport) and then use a PL/SQL procedure to parse the extract and update the Planning tables with a "active" UDA. At the end, our client is able to extract all data from the members he want (dataexport in a FIX with @UDA).
    PS : We could not use DATAEXPORTCOND as the flag are not on the same crossing as the data.
    So, we had the choice with our PL/SQL procedure : generate a file to update members with outlineload or modify the planning tables. The last option seems the easiest.
    Is that more clear ?
    Frédéric

  • 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.

  • After creating Peopletools 8.52, FSCM 9.0 Demo PSSTATUS table shows 8.48

    Hi
    I am building the new demo environment for Finance.
    PeopleTools 8.52
    FSCM 9.0
    on unicode database with Demo option. But running the datamover scripts, PSSTATUS table still shows 8.48.
    Any Ideas ?
    Thanks,
    Sarathy K

    Actually the reason why it is showing 8.48 is because FSCM 9.0 have application database version 8.48 and you are installing peopletools 8.52 so you need to update your database setup by running some peoplesoft delivered sql scripts.
    Refer the installation guide for Peopletools 8.52 http://docs.oracle.com/cd/E26530_01/psft/acrobat/PeopleTools_8.52_Installation_Oracle.pdf
    In chapter 7 the very first topic describes it very well.
    In short go to PS_HOME\scripts
    and find following scripts...
    Required Scripts for Non-Unicode Databases
    rel849, rel850, rel851, and rel852
    Note. If you are installing a 9.0 or higher application, run rel849n, rel850n,
    rel851n, and rel852n instead.
    Required Scripts for Unicode Databases
    rel849u, rel850u, rel851u, and rel852u
    Note. If you are installing a 9.0 or higher application, run rel849un, rel850un,
    rel851un, and rel852un instead.
    Gaurav

  • How to corret an execution plan that shows wrong number of rows?

    Using Oracle 10gR2 RAC (10.2.0.3) on SUSE Linux 9 (x86_64).
    I have a partition table that has 5 million rows (5,597,831). However an execution plan against the table show that the table has 10 million rows.
    Execution plan:
    SELECT STATEMENT ALL_ROWS Cost : 275,751 Bytes : 443 Cardinality : 1
    3 HASH GROUP BY Cost : 275,751 Bytes : 443 Cardinality : 1
         2 PARTITION RANGE ALL Cost : 275,018 Bytes : 4,430,000,000 Cardinality : *10,000,000* Partition # : 2 Partitions accessed #1 - #6
              1 TABLE ACCESS FULL TRACESALES.TRACE_BUSINESS_AREA Cost : 275,018 Bytes : 4,430,000,000 Cardinality : 10,000,000 Partition # : 2 Partitions accessed #1 - #6
    Plan hash value: 322783426
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 443 | 275K (2)| 00:55:10 | | |
    | 1 | HASH GROUP BY | | 1 | 443 | 275K (2)| 00:55:10 | | |
    | 2 | PARTITION RANGE ALL| | 10M| 4224M| 275K (2)| 00:55:01 | 1 | 6 |
    | 3 | TABLE ACCESS FULL | TRACE_BUSINESS_AREA | 10M| 4224M| 275K (2)| 00:55:01 | 1 | 6 |
    How does one correct the explain plan?
    The problem: Queries against the table are taking hours to complete. The problem started when the table was dropped then recreated with a new partition.
    I have complete the drop and creation against several tables for several years without problems until now.
    I have done the following: Analyzed statistics against the table, flushed buffer cache. Created a materialized view.
    However users queries are taking several hours to complete, where before the addition of the partition the queries where taking 5 minutes to complete.
    Thanks. BL.

    Yes, complete analysis of statistic was complete on indexes and against partitions.
    Table creation statement:
    CREATE TABLE TRACESALES.TRACE_BUSINESS_AREA
    ... *(400 columns)*
    TABLESPACE "trace_OLAPTS"
    PCTUSED 0
    PCTFREE 15
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL KEEP
    PARTITION BY RANGE (YEAR)
    PARTITION TRACE_06 VALUES LESS THAN ('2007')
    NOLOGGING
    NOCOMPRESS
    TABLESPACE TRACE_2006
    PCTFREE 15
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    PARTITION TRACE_07 VALUES LESS THAN ('2008')
    NOLOGGING
    NOCOMPRESS
    TABLESPACE TRACE_2007
    PCTFREE 15
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    PARTITION TRACE_08 VALUES LESS THAN ('2009')
    NOLOGGING
    NOCOMPRESS
    TABLESPACE TRACE_2008
    PCTFREE 15
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    PARTITION TRACE_09 VALUES LESS THAN ('2010')
    NOLOGGING
    NOCOMPRESS
    TABLESPACE TRACE_2009
    PCTFREE 15
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    PARTITION TRACE_10 VALUES LESS THAN ('2011')
    NOLOGGING
    NOCOMPRESS
    TABLESPACE TRACE_2010
    PCTFREE 15
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    PARTITION TRACE_11 VALUES LESS THAN (MAXVALUE)
    NOLOGGING
    NOCOMPRESS
    TABLESPACE TRACE_2011
    PCTFREE 15
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOCOMPRESS
    CACHE
    PARALLEL ( DEGREE DEFAULT INSTANCES DEFAULT )
    MONITORING;
    *(index statements, constraints, triggers and security)*
    Table caching is on and running in parallel degree 4 instances 1.

  • Plan table output

    Hello guys,
    I am on a 9.2.0.7.0, and i am trying to get explain plan for one select that is reading some table through the db link at the remote sight.
    Unfortunately, i am getting this output :
      1* select * from table(dbms_xplan.display)
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name       | Rows  | Bytes | Cost  | Inst   |IN-OUT|
    |   0 | SELECT STATEMENT     |             |       |       |       |        |      |
    |   1 |  REMOTE              |             |       |       |       | TESTI1 | R->S |
    Note: rule based optimization
    9 rows selected.remote database is 10.2.0.4.0
    Can you reccomend me something?
    Why can't i see normal output from the plan table, what to do to see it ?
    Also , i could'nt find anywhere in the docs the meaning for R->S...
    thanks

    thanks for your time to reply
    @Kartrick
    -so can we say that the only way to see that plan would be to connect to that remote instance with that db link user and run it there?
    @ravikumar
    -this woried me to... so optimizer mode on that remote 10.2.0.4.0 is choose, so can we say that this query is attacking remote table with RBO plan ?

  • Planning user not found in Planning Tables

    Hi,
    I have provisioned the user in shared services and then ran the provisionsuser.cmd utility as well. This user has different issue, has access to all Business Rules and Planning also but not able to run the BR's and not able to see them in planning.
    When I ran a query to check the existance of user in HSP_Object, this user didn't find but able to login into planning and EAS console as well.
    Please help me why this user is not in HSP_OBJECT table.
    Thanks in advance for your help.
    Regards,
    UB

    If the user can log into the planning application then they will exist in the planning tables.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Splitting in REM planning table

    Hello,
    I am presently working with REM planning table.In planning table there is functinality of splitting the monthly quantities to daily quantities or weekly quantities.
    When you split the quantities what calculation system is doing internally?
    How system determines the start and end dates for the splitted orders.
    If I want to split the quantities on the basis of fixed percentages that is 18  % first week , then 23 % second week , 25 % third and rest percentages for last week.
    Can this weekwise varying distibution is possible in Planning table ?
    Waiting for reply from the REM Gurus.
    Regards,

    Hi ravindra,
    if u are working with longer lead time planned order, u can use various functinality to split the order qty for day or shift wise.
    The Avilable Capacity of the workcenter plays important Role.With refernce to this Avilable capacity the sytem schedules (spilts) order qty as per your need.
    Lead time scheduling will be carried out to determine start and end date of planned orders.
    For example u want distribute planned order day wise, system schedules the planned order with reference to Daywise Avilable capacity of WC. if the capacity requirements of planned order exceeds the avilable capacity of one day, system will automatically spilit the order qty for next day for remaining capacity requirements.
    This is way, system works to spilit the order. Before that u have to select correct scheduling data under "scheduling" tab of planning table.
    For your last question, system will schedule planned order according to Avilabale capacity and capacity requirements.
    i think u can spilit manually accorting to your need .Since  u have Avilable capacity for full week why do u want to spilit with some percentage.
    Regards
    pradeep

  • Significance or use of various planning tables

    Hi All
    Can anyone please explain the significance of various tables used in planning.
    I have searched the whole of Oracle portal but i haven't found a documentation which explains the importance or significance of various tables of planning.
    If possible please provide me the link of this documentation or kindly let me know the significance of various planning tables.
    Thanks in advance
    regards
    krishnatilak

    VK, locale controls what landing page the recipient would see if he clicked an Unsubscribe or Opt Out from List link. The landing page shows up in that language.
    Character set governs the display of characters in the email such as text or double byte characters. It should be set to Unicode (UTF-8) unless there is a very specific reason not to.

  • IP: How to build a single planning table

    Hi,
    Could somebody tell me how could I build a single planning table (without fact column) for BEx Analyzer? If I put only the plan column into the input ready query, than the Analyzer not displaying any data ("there aren't data to display"). Recently we define a hidden fact column next to plan data, but I think there are better way to solve this problem...
    Regards,
    Adam

    Hi.
    As I can understand, you want to show blank cells fof entering a planning data ?
    Just set to "mater data" access for the characteristic in BEX.
    This way all master data values of the characteristic will appear with blank key figures.
    Regards.

  • IMG setting for REM Planning Table

    Hi Gurus,
    Can any one throw light on following IMG settings-
    Path -
    IMG --> Production --> REM --> Planning --> Planning table --> Maintain Row selection --> Reciepts Other version
    Relevance of "Other version - in IMG setting for visible rows in planning table".
    Planning table output does not change with check or uncheck of version.
    Which check or unchecking, planning table is considering all the production versions of the materials maintained.
    What is purpose of having a check or uncheck, if system is giving the same result.
    Regards,
    Srini

    Hi Srini,
    We create production version to OPTIMIZE the production. We mention the routing and the BOM in the production version. Actually speaking, in the REM scenario we don't even need a planned order. Production order is absolutely not needed. So in the planning table, it shows the production data for all the versions that you have created, irrespective of whether or not you check the indicator. During planning run, the system will take the first production version by default. So in the planning table you can see the optimum production and you can do leveling also, possible through the row selection option in IMG. Hope this sheds a light on your concern.
    Regards,
    Sreekant.

  • REM Planning table - Capacity requirements and Levelling.

    Hi i have few queries in REM planning table.
    In REM planning table MF50 my selection is based on entire plant. Here in total capacity data tab for any particular plant it will show the list of work centers which are maintained in particular plant to know the capacity details as per our requirement.
    1.When i select any WC line and click on change capacity display from CRP it is giving break up with required and available capacity hours for any particular WC available time is assume 22.5 hrs per day which is given in operating time in capacity header in WC but in MF50 it is showing 23hrs.I have defined shift sequence in OP4A and assigned in capacity header grouping which have 3 shift with 30 mins break in each shift which results in 22.5 hrs working for a day so in shift sequence and operating time it is mentioned as 22.5 hrs is the time available for day but in MF50 it is showing 23 hrs available for day?
    2.What is due% in MF50 total capacity data for any work center and how required time would be calculated?
    Appreciate if any one has any example.
    Cheers
    KK

    Hi bump for any suggestions?
    i have noticed one thing the time available is a round up value actual time available as per capacity header is 22.5 but in MF50 it is showing as 23..if i change to 21.5 then it is showing 22hrs available per day is this the standard behaviour?
    can anyone tell me how the required time is calculated?
    Cheers
    KK

  • MF50 Planning table

    Hi Gurus,
    I am working on planning table - MF50.
    I want to understand "Relevance of Refresh RS from - Actual Demand & Smoothed Demand".
    What to make a scenario for this for demo purpose showing the clear difference between the Actual and Smoothed Demand?
    Any guidance?
    Thanks in advance,
    Srini

    Create few planned orders and customer requirements with different dates.
    Actual demand - Takes the current stock of requirements
    Smoothed demand - computes the average requirements in the planning buckets and eliminates any sudden surge in demands for example - surge in product demand due to local or regional requirements
    Thanks,
    Srinivas Karri

Maybe you are looking for

  • Error when activating an R/3 generic datasource in BW

    Hi I've created a generic datasource in R/3 4.6C system using a table view over R/3 standard Project System tables with joins.  This datasource has been activated. I then replicated this generic datasource in BI7 datawarehousing environment.  The rep

  • Connecting macbook keyboard to iBook...

    I upgraded from my iBook G4 to a MacBook in June, yesterday I realised I had some files on my old iBook that I wanted to get hold off, but I couldn't log into my iBook due to some damage with the keyboard... I haven't been keeping it very well since

  • Sapinst error

    I'm in the process to upgrade support pack 17 for Java in XI.While running sapinst, i'm getting the following error: r2n0v3::root:/xi_cds/sp17/SAPINST-CD/SAPINST/UNIX/HP11_64> ./sapinst [==============================] \ extracting...  done! WARNING 

  • Help with self join

    I need help to optimize this query - it's taking too long and the report times out - it jins to itself: /* Formatted on 2005/03/01 14:12 (Formatter Plus v4.8.5) */ sELECT-- /*+ FIRST_ROWS */ --SELECT /*+ ROWID*/ aud.inv_id change_value_1, aud.inv_id

  • Java drop down menu, target frame

    Hi everyone...I'm brand new to this and found how to make this menu by searching the web. I need my links to open in a new frame, but can't find how to do it. Can you help? Thanks! <form method="POST" name="currents">   <p><select name="currentslist"