Query regarding database size

hi,
( sap 4.7c + sql server 2000 (Module:sd/mm/fi )
( data : 1 & half year - no BI )
our database size is around 50 GB
and log size is around 30 GB
I doubt that something is wrong.
can anyone explain to me what is right and
what action one should take on this type of scenario.
thanks in advance
raj

Hi Raj,
My database size is about 30GB (3 years of usage) and log file is about 12GB.
My database settings (recomendent by SAP and Early watch) are:
I shrinked database to minimum size and set following settings:
Database (mdf and ndf):
- growth activated: checked
- growth not restricted: checked
- next step possible: checked
- next step size: 60MB
tempdb and log file:
- growth activated: checked
- growth not restricted: checked
- next step possible: checked
- next step size: 10%
Regards,
Marcin Gajewski

Similar Messages

  • Query regarding database access segregation using os authentication in windows environment

    Hi ,
    I have a query regarding database access segragation using os authentication (like sqlplus "/ as sysdba") in windows environment.Let me briefly explain my requirement:-
    Suppose you have two DBA`s viz DBA1 and DBA2 and 4 databases resideds in a windows server say A,B,C & D.Now I want to set up such a way if DBA1 logs into the server then he can login to database A and B only using OS authentication and DBA2 can login to database C and D only using OS authentication.
    Please let me know how to do setup for this requirement.
    Database version is 11.2.0.3

    1494629, I am not a Windows person but if there is any way to do this I suspect some additional information is necessary:
    Are the DBA users members of the Administrators Group ?
    Do all 4 database share the same $ORACLE_HOME ?
    I suspect if either answer above is yes then this is not possible, but like I said I am not a Windows person.  I would just ask for two servers and the associated licensing to be acquired.  The requirement to spend money to do something management wants usually elimanates the request in my world.
    HTH -- Mark D Powell --

  • Query on Database Size

    Hi all,
    I have a question regarding database size of my SAP Instance. My database by the way is Oracle 10g. I used the db02old transaction code. I got the ff: data in the space statistics:
    Scale: Month                                            Database
        Date               Values             SIze/kb                      Free/kb
    01.09.2009         Total            258744,320                 27,741,824
    01.08.2009         Total            258744,320                 30,568,320
    01.07.2009         Total            258744,320                 34,444,288
    01.06.2009         Total            258744,320                 38,159,168
    01.05.2009         Total            247152,640                 29,041,344
    01.04.2009         Total            247152,640                 35,197,184
    01.03.2009         Total            235560,960                 39,262,144
    01.02.2009         Total            205455,360                 14,124,224
    01.01.2009         Total            201175,040                 14,463,168
    01.12.2008         Total            197324,800                 14,466,112
    01.11.2008         Total            193474,560                 14,282,560
    01.10.2008         Total            188907,520                 13,716,736
    Note that the size from 01.06.2009 to 01.09.2009 has not changed. Does this mean that my database hasnt grown at all?
    How can I determine the exact growth of my database? Im planning to do some projection on how long will it take before my entire disks are consumed so I need to gather some data with respect to my database growth per month.
    Thanks in advance
    Jun

    >
    Aurelio Tadlas wrote:
    > HI Anjali,
    >
    > Yes, that's precisely what happened. Now I know that the size indicated in db02old is not actually the size of the data contained in the database but rather, its the size of the tablespaces in my database.
    >
    > Thank you very much for the enlightenment.
    >
    > Best regards
    Hi,
    Sorry for "interrupt" here.
    I'd recommend you to read the Oracle Database Concept Guide or go to any initial training (like ADM505)
    There you will find out that with "database" Oracle refers to the physical files.
    You can create a DB of 1 TB and that will be the database size, regardless of the data that is "inside".
    That means that, at the end, you more or less understood.
    DB02 shows the database size, not the amount of data that is inside the database

  • Query regarding database reorganization

    Hi All,
    I have been asked to reorganize the database( size 220GB Dev, size 460GB Qua, size 500GB Production)
    Database is Oracle 10G, SAP version is ECC 6.0.
    I tried this via BRtools on a test system(size 130GB,Oracle 10G) and nothing happens.Assuming this,I doubt any change.
    However my management is insisting size must decrease by 10 -12 percent.
    My query is if I reorganize the database via BRTOOLS what will be the effect on the database size.
    No client is deleted on any of the system and no data has been erased by the functional team.
    Any suggestion on the same will be a great help to me.
    Regards,
    PG

    Hi,
        How much space is liberated after a re-org task is purely subjective ( system load, when the last re-org was run etc). A test system with no user activity cannot form an ideal test-bed for re-org outcome. Rather than looking out for benefit in terms of percentage of space shrunk, you could look at all avenues that can bring down the database size. The following notes might be used as a starting point.
    SAP Note 541538 - FAQ: Reorganization
    SAP Note 771929 - FAQ: Index fragmentation (Easier than a table re-org task.Can be done online ( before attempting this online, please go through the SAP Hot News announced in SAP Note 1413928 - Index corruption/wrong results after rebuild index ONLINE )
    SAP Note 706478 - Preventing Basis tables from increasing considerably (Exectue the SQL query in the note to identify the tables that occupy highest space and look for corresponding solutions in this note for those tables)
    Above messages' SAP Data Volume Management guide also has suggestions for triggering archiving/deleting/compressing/avoid growth where necessary
    cheers !
    PRADi

  • Query for database size

    I need a query which should display the current size of database and the size of the database one month back. I have tried with OEM but if the database goes down in between, it won't display the result.(OS-HP-Unix, Linux, Ver-8i,9i,10g)

    user10929871 wrote:
    My friend,
    I have a query to find out the size one month back (Note: It doesn't include temp and redo logs size)
    select sum(bytes)/1073741824 from v$datafile where
    creation_time<to_date('01-03-2009','dd-mm-yyyy');That assumes that the only way you are adding space to the database is to add new data files which doesn't seem realistic. It's rather common to increase the size of the database by adding space to an existing data file or allowing a data file to autoextend at least to a point. Are you certain that, for the databases you're working with, the only way that anyone ever adds space to a database is to add new data files?
    and for view the current size
    select sum(bytes)/1073741824 from v$datafile ;
    I have tested and it worked hope I am right if this queries are wrong plz let me know, now what I am looking for is a query where I don't need to provide the specific date just something like add_months function to this query and I want the above two queries into one, something like this but its giving me the wrong result
    select sum(a.bytes)/1024/1024/1024, sum(b.bytes)/1024/1024/1024 from v$datafile a,v$datafile b where a.creation_time<to_date('01-03-2009','dd-mm-yyyy') and b.creation_time<=sysdate
    /If you're sure that the "prior month" query is correct for your environment
    SELECT a.gb old_size, b.gb new_size
      FROM (SELECT sum(bytes)/1073741824
              FROM v$datafile
             WHERE creation_time < trunc(sysdate,'MM')) a,
           (SELECT sum(bytes)/1073741824
              FROM v$datafile ) bJustin

  • Regarding Database Size

    Hi all,
    Iam New  to this forum can any one help me out
    We are using ECC 6.0 SR2,  SQL Server 2005 and Win 2003 OS
    please let me know according to our business scenario our data growth should be maximum 50MB
    daily but we found that our data is being growing drastically more 100MB, 200MB and more. what might be the problem and what shoud i do as a Basis administrator please guide me in detail what TCodes should i use, please do the needful....
    Regards
    Surya

    hi,
      Please check whether standard background jobs are scheduled ar not.
      if not do it in SM36.
      we have to schedule backups.
      database free size can be seen in DB02
      if free size is less, add data file
      reward points if it is helpfull
    regards,
    raju.

  • Query regarding database patching

    Hi ,
    I am on Oracle 11G and Solaris SPARC 64-bit server.
    The server admin have applied the oracle CPU that was released on April 18,2011.
    I have the path to the new oracle home now.
    Currently my oracle home is 11.1.0.7.P1 and the new oracle home is
    11.1.0.7.P2.
    Now the practice that i have been following to change my oracle home(Patching) is :
    1. Shutdown db
    2. Change oratab with new home:Y
    3. Change my .profile for $ORACLE_HOME
    4. Startup the database with init.ora
    5. Run catbundle.sql cpu apply
    6. Run recompile_precheck_jan2008cpu.apply
    7. View_recompile_jan2008cpu.sql
    8. Shutdown immediate and startup
    9. Change oracle home in listener.ora
    10.Create softlink of init.ora to /dbs/ of new oracle home.
    Now I have 2 queries :
    1.Since the database runs fine post it , I am not able to conclude
    if any other sql also needs to be run ?
    2. What is the location of the readme.txt and readme.html which i need to check for invalid objects.
    I have searched but couldn find it. :(
    Also , How do i test the performance pre and post patching..
    Will doing it by just checking the time taken for Data loads pre and post
    patching sufficient.
    What other checks can i do in dev to test for patch.
    Thanks and Regards
    Kk

    Hi ,
    In this particular database , ive run the catbundle.sql and its been almost 30 mins that its at this location :
    SQL> @?/rdbms/admin/initcdc.sql
    SQL> Rem
    SQL> Rem $Header: initcdc.sql 15-mar-2006.08:20:07 mbrey Exp $
    SQL> Rem
    SQL> Rem initcdc.sql
    SQL> Rem
    SQL> Rem Copyright (c) 2000, 2006, Oracle. All rights reserved.
    SQL> Rem
    SQL> Rem    NAME
    SQL> Rem      initcdc.sql - script used to load CDC jar files into the database
    SQL> Rem
    SQL> Rem    DESCRIPTION
    SQL> Rem      <short description of component this file declares/defines>
    SQL> Rem
    SQL> Rem    NOTES
    SQL> Rem      script must be run as SYS
    SQL> Rem
    SQL> Rem    MODIFIED   (MM/DD/YY)
    SQL> Rem    mbrey       03/15/06 - bug 5092790 add datapump registration
    SQL> Rem    pabingha    02/25/03 - fix undoc interfaces
    SQL> Rem    wnorcott    03/14/02 - bug-2239726 disable triggers.
    SQL> Rem    wnorcott    01/31/02 - function 'active' return 0 or 1.
    SQL> Rem    wnorcott    01/30/02 - disable CDC triggers, CREATE_CHANGE_TABLE re-enables.
    SQL> Rem    wnorcott    06/26/01 - rid trailing slash.  As per Mark Jungermann
    SQL> Rem    gviswana    05/25/01 - CREATE OR REPLACE SYNONYM
    SQL> Rem    jgalanes    11/17/00 - for Import/Export grant execute on util to
    SQL> REM                           SELECT_CATLOG_ROLE
    SQL> Rem    wnorcott    09/07/00 - new loadjava syntax for performance.
    SQL> Rem    wnorcott    07/18/00 - rid LOGMNR_UID$.clientid
    SQL> Rem    wnorcott    06/28/00 - move logmnr_dict view here
    SQL> Rem    wnorcott    03/28/00 - fix trigger install
    SQL> Rem    wnorcott    03/27/00 - Install change table triggers
    SQL> Rem    mbrey       01/26/00 - script to load CDC jars
    SQL> Rem    mbrey       01/26/00 - Created
    SQL> Rem
    SQL> call sys.dbms_java.loadjava('-v -f -r -s -g public rdbms/jlib/CDC.jar');How do i check if its still running or failed ?
    *PS : Ive read this note :Script Fails At Loadjava With ORA-03113 and ORA-03114 [ID 358232.1] But its when it errors out , for me its not erroring out also..*
    Thanks
    Kk
    Edited by: Kk on May 25, 2011 2:40 AM

  • Query Regarding Database Split

    hi all,
    My client have 4 Units in which nearly 80%items are same in all 4 units,Bp are 40% approx same please suggest me how to manage 4 unit in 1 database or in 4 diffrent database.What problem i face if i choose 1 database for all four unit.
    Note:All 4 unit working seperatly
    Thanks and regards
    Rahul

    Hi
    First of all u cant generate Balance sheet for all four units seperately.....(TB and P&L can be generated sep. if u have maintained Profit centres...) BY using some of tools this also we can achieve but not in std. sbo.
    For connecting all Four units u should have Brooad band connection to access the server. In India most of the time the Broadband will be slow r down only....
    All customers Balances  can be seen by other branch peoples also.......
    Unwanted Masters which is not belongs to other branch also will be availlable to everyone.anyway that can be filltered...
    Giri

  • Query regarding Database Level changes

    Hi
    I am working with a datawarehouse which extracts and populates data overnight across several tables in the reporting layer and across 5 different schemas.
    The source tables of these remain same (which will get data updated each and every day) but the reporting layer tables are built in the trash-and-build mode (because of business reasons) which brings in data say from the year 2000 (from the source) which might NOT be getting changed in the source tables at all.
    These tables population especially causes the jobs to slow down and cause performance issues.
    Is there any way in Oracle to find out if say :-
    Reporting Layer Table :- RPT_TAB
    Source Tables :- S1, S2, S3
    Can we find out if there are any changes to the data of S1,S2,S3 for a period of time say from year 2000 - year 2004 when they are being picked up by the proc which populates RPT_TAB?
    If there is any way, through which we can generally establish which are the tables for which for the above period there are no changes in data then we can archive such data and exclude them from loading into the reporting layer tables every day?
    We are using Oracle 9i and PLSQL to populate all the data in the tables.
    Please help me ASAP.
    Thanks
    Arnab

    Most of the source tables do not have last updated date. But the queries which combine and bring in data to Reporting Layer tables are complex and use lot many tables, sequences, views, etc to load the data. So, that is the reason I was looking for something at the generic Oracle level if it maintains anything for a certain period of time against any given table in the database.
    Thanks
    Arnab

  • QUERY TO GET database size, used size, freesize, tablespacesize of RQ table

    Pls give me a query for to get database size, used size, freesize, tablespacesize of sometables which is starting with 'RQ%'
    I have to get result like this
    Total size, used size, free size ,tablespace size of RQ tables alone
    Reason why i go for "tablespace size of RQ tables" i want to know the size of database after deleting the rq tables
    ( Since i am not getting any reply i go for database forum)
    Pls reply
    S
    Edited by: AswinGousalya on Jul 8, 2009 3:41 PM

    Hello,
    This question looks like it is really for the Oracle RDBMS and not for Berkeley DB. In BDB, we do not have a notion of tablespace size. What database product are you using?
    regards,
    mike brey
    BDB engineering

  • Query for  to get  database size, used size, freesize, db size after drop

    Pls give me a query for to get database size, used size, freesize, tablespacesize of sometables which is starting with 'RQ%'
    I have to get result like this
    Total size, used size, free size ,tablespace size of RQ tables alone
    Reason why i go for "tablespace size of RQ tables" i want to know the size of database after deleting the rq tables
    Pls reply
    S

    i tried with
    SELECT
    --fs.tablespace_name name,
    df.totalspace/1024/1024 mbytes,
    (df.totalspace - fs.freespace)/1024/1024 used,
    fs.freespace/1024/1024 free
    FROM
    (SELECT
    --tablespace_name,
    ROUND(SUM(bytes)) TotalSpace
    FROM
    dba_data_files
    ) df,
    (SELECT
    --tablespace_name,
    ROUND(SUM(bytes)) FreeSpace
    FROM
    dba_free_space
    ) fs
    i AM GETTING total bytes, used bytes, free bytes
    I WANT TO include one more column.. database size after deleting rq tables
    Pls reply
    S
    Edited by: AswinGousalya on Jul 10, 2009 2:17 PM

  • Explain plans differ:  same query, cloned databases.

    oracle 10.2.0.2.0
    solaris 10
    same query, different databases (cloned from same source), different explain plans.
    db parameters are identical.
    Any ideas?
    DB1 (production)
    SQL> explain plan for
      2  SELECT  V__101.*,   SHAPE.fid,SHAPE.numofpts,SHAPE.entity,SHAPE.points,
      3    SHAPE.rowid
      4  FROM
      5   (SELECT b.OBJECTID,b.CRT_DTE,b.CRT_SRC_CDE,b.CRT_AQUI_MTHD_CDE,b.CRT_USR_ID,
      6    b.ADT_ACTN_CDE,b.ADT_ACTN_DTE,b.ADT_ACTN_SRC_CDE,b.ADT_ACTN_USR_ID,
      7    b.TP_SITE_POINT_ID,b.SHAPE,b.SRC_ID,b.SRC_CRT_DTE,b.SRC_TYPE_CDE,
      8    b.LCTN_STAT_CDE,b.FRZN_LCTN_IND,b.TP_NOTES   FROM AMSOWNER.TP_SITE_POINT b
      9    WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM
    10    AMSOWNER.D101 WHERE DELETED_AT IN (SELECT l.lineage_id FROM
      SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND
    11   12    l.lineage_id <= :source_state_id) AND SDE_STATE_ID = :"SYS_B_0") UNION ALL
      SELECT a.OBJECTID,a.CRT_DTE,a.CRT_SRC_CDE,a.CRT_AQUI_MTHD_CDE,a.CRT_USR_ID,
    13   14    a.ADT_ACTN_CDE,a.ADT_ACTN_DTE,a.ADT_ACTN_SRC_CDE,a.ADT_ACTN_USR_ID,
    15    a.TP_SITE_POINT_ID,a.SHAPE,a.SRC_ID,a.SRC_CRT_DTE,a.SRC_TYPE_CDE,
    16    a.LCTN_STAT_CDE,a.FRZN_LCTN_IND,a.TP_NOTES   FROM AMSOWNER.A101 a,
    17    SDE.state_lineages SL WHERE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+
    18    HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM AMSOWNER.D101 WHERE
    19    DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE
    20    l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id)
    21    AND SDE_STATE_ID > :"SYS_B_1") AND a.SDE_STATE_ID = SL.lineage_id AND
    22    SL.lineage_name = :source_lineage_name AND SL.lineage_id <=
    23    :source_state_id ) V__101 , AMSOWNER.F15 SHAPE where SHAPE.FID(+) =
    24    V__101.SHAPE;
    Explained.
    SQL>  @?/rdbms/admin/utlxplp.sql;
    PLAN_TABLE_OUTPUT
    Plan hash value: 254376361
    | Id  | Operation                         | Name             | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   113K|    49M|       |  2926   (1)| 00:00:41 |
    |*  1 |  HASH JOIN RIGHT OUTER            |                  |   113K|    49M|    17M|  2926   (1)| 00:00:41 |
    |   2 |   TABLE ACCESS FULL               | F15              |   113K|    15M|       |   344   (2)| 00:00:05 |
    |   3 |   VIEW                            |                  |   113K|    34M|       |   331   (2)| 00:00:05 |
    |   4 |    UNION-ALL                      |                  |       |       |       |            |          |
    |*  5 |     HASH JOIN RIGHT ANTI          |                  |   113K|  8948K|       |   332   (2)| 00:00:05 |
    |   6 |      VIEW                         | VW_NSO_1         |     1 |    13 |       |     2   (0)| 00:00:01 |
    |   7 |       NESTED LOOPS                |                  |     1 |    50 |       |     2   (0)| 00:00:01 |
    |   8 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |       |     1   (0)| 00:00:01 |
    |*  9 |         INDEX SKIP SCAN           | D101_IDX1        |     1 |       |       |     1   (0)| 00:00:01 |
    |* 10 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    |  11 |      TABLE ACCESS FULL            | TP_SITE_POINT    |   113K|  7512K|       |   329   (2)| 00:00:05 |
    |* 12 |     HASH JOIN ANTI                |                  |     1 |   375 |       |     5  (20)| 00:00:01 |
    |  13 |      NESTED LOOPS                 |                  |     1 |   349 |       |     2   (0)| 00:00:01 |
    |  14 |       TABLE ACCESS BY INDEX ROWID | A101             |     1 |   338 |       |     1   (0)| 00:00:01 |
    |* 15 |        INDEX RANGE SCAN           | A101_STATEID_IX1 |     1 |       |       |     1   (0)| 00:00:01 |
    |* 16 |       INDEX UNIQUE SCAN           | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    |* 17 |      VIEW                         | VW_NSO_2         |     1 |    26 |       |     2   (0)| 00:00:01 |
    |  18 |       NESTED LOOPS                |                  |     1 |    50 |       |     2   (0)| 00:00:01 |
    |* 19 |        INDEX FULL SCAN            | D101_PK          |     1 |    39 |       |     1   (0)| 00:00:01 |
    |* 20 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("SHAPE"."FID"(+)="V__101"."SHAPE")
       5 - access("B"."OBJECTID"="$nso_col_1")
       9 - access("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
           filter("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
      10 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      12 - access("A"."OBJECTID"="$nso_col_1" AND "A"."SDE_STATE_ID"="$nso_col_2")
      15 - access("A"."SDE_STATE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      16 - access("SL"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("SL"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      17 - filter("$nso_col_2"<=TO_NUMBER(:SOURCE_STATE_ID))
      19 - access("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
           filter("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
      20 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
    47 rows selected.DB2 (staging)
    SQL> explain plan for
      2  SELECT  V__101.*,   SHAPE.fid,SHAPE.numofpts,SHAPE.entity,SHAPE.points,
      SHAPE.rowid
    FROM
      3    4    5   (SELECT b.OBJECTID,b.CRT_DTE,b.CRT_SRC_CDE,b.CRT_AQUI_MTHD_CDE,b.CRT_USR_ID,
      b.ADT_ACTN_CDE,b.ADT_ACTN_DTE,b.ADT_ACTN_SRC_CDE,b.ADT_ACTN_USR_ID,
      6    7    b.TP_SITE_POINT_ID,b.SHAPE,b.SRC_ID,b.SRC_CRT_DTE,b.SRC_TYPE_CDE,
      8    b.LCTN_STAT_CDE,b.FRZN_LCTN_IND,b.TP_NOTES   FROM AMSOWNER.TP_SITE_POINT b
      9    WHERE b.OBJECTID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM
    10    AMSOWNER.D101 WHERE DELETED_AT IN (SELECT l.lineage_id FROM
    11    SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND
    12    l.lineage_id <= :source_state_id) AND SDE_STATE_ID = :"SYS_B_0") UNION ALL
    13    SELECT a.OBJECTID,a.CRT_DTE,a.CRT_SRC_CDE,a.CRT_AQUI_MTHD_CDE,a.CRT_USR_ID,
    14    a.ADT_ACTN_CDE,a.ADT_ACTN_DTE,a.ADT_ACTN_SRC_CDE,a.ADT_ACTN_USR_ID,
    15    a.TP_SITE_POINT_ID,a.SHAPE,a.SRC_ID,a.SRC_CRT_DTE,a.SRC_TYPE_CDE,
    16    a.LCTN_STAT_CDE,a.FRZN_LCTN_IND,a.TP_NOTES   FROM AMSOWNER.A101 a,
    17    SDE.state_lineages SL WHERE (a.OBJECTID, a.SDE_STATE_ID) NOT IN (SELECT /*+
      HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID  FROM AMSOWNER.D101 WHERE
    18   19    DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE
    20    l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id)
    21    AND SDE_STATE_ID > :"SYS_B_1") AND a.SDE_STATE_ID = SL.lineage_id AND
    22    SL.lineage_name = :source_lineage_name AND SL.lineage_id <=
    23    :source_state_id ) V__101 , AMSOWNER.F15 SHAPE where SHAPE.FID(+) =
    24    V__101.SHAPE;
    Explained.
    SQL>  @?/rdbms/admin/utlxplp.sql;
    PLAN_TABLE_OUTPUT
    Plan hash value: 4287458713
    | Id  | Operation                         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    |   1 |  NESTED LOOPS OUTER               |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    |   2 |   VIEW                            |                  |   145 | 47125 |   328   (1)| 00:00:05 |
    |   3 |    UNION-ALL                      |                  |       |       |            |          |
    |*  4 |     HASH JOIN ANTI                |                  |   144 | 10224 |   324   (1)| 00:00:05 |
    |   5 |      TABLE ACCESS FULL            | TP_SITE_POINT    |   145 |  8410 |   322   (1)| 00:00:05 |
    |   6 |      VIEW                         | VW_NSO_1         |     1 |    13 |     2   (0)| 00:00:01 |
    |   7 |       NESTED LOOPS                |                  |     1 |    50 |     2   (0)| 00:00:01 |
    |*  8 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |     1   (0)| 00:00:01 |
    |*  9 |         INDEX SKIP SCAN           | D101_IDX1        |     1 |       |     1   (0)| 00:00:01 |
    |* 10 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |* 11 |     FILTER                        |                  |       |       |            |          |
    |  12 |      NESTED LOOPS                 |                  |     1 |   349 |     2   (0)| 00:00:01 |
    |  13 |       TABLE ACCESS BY INDEX ROWID | A101             |     1 |   338 |     1   (0)| 00:00:01 |
    |* 14 |        INDEX RANGE SCAN           | A101_STATEID_IX1 |     1 |       |     1   (0)| 00:00:01 |
    |* 15 |       INDEX UNIQUE SCAN           | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |* 16 |      FILTER                       |                  |       |       |            |          |
    |  17 |       NESTED LOOPS                |                  |     1 |    50 |     2   (0)| 00:00:01 |
    |* 18 |        TABLE ACCESS BY INDEX ROWID| D101             |     1 |    39 |     1   (0)| 00:00:01 |
    |* 19 |         INDEX RANGE SCAN          | D101_IDX1        |     1 |       |     1   (0)| 00:00:01 |
    |* 20 |        INDEX UNIQUE SCAN          | LINEAGES_PK      |     1 |    11 |     1   (0)| 00:00:01 |
    |  21 |   TABLE ACCESS BY INDEX ROWID     | F15              |     1 |   145 |     1   (0)| 00:00:01 |
    |* 22 |    INDEX UNIQUE SCAN              | F15_UK1          |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("B"."OBJECTID"="$nso_col_1")
       8 - filter("DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID))
       9 - access("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
           filter("SDE_STATE_ID"=TO_NUMBER(:SYS_B_0))
      10 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      11 - filter( NOT EXISTS (SELECT /*+ HASH_AJ */ 0 FROM "AMSOWNER"."D101"
                  "D101","SDE"."STATE_LINEAGES" "L" WHERE :B1>TO_NUMBER(:SYS_B_1) AND
                  "DELETED_AT"="L"."LINEAGE_ID" AND "L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID) AND "SDE_STATE_ID"=:B2 AND
                  "SDE_DELETES_ROW_ID"=:B3 AND "DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID) AND
                  "SDE_STATE_ID">TO_NUMBER(:SYS_B_1)))
      14 - access("A"."SDE_STATE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      15 - access("SL"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "A"."SDE_STATE_ID"="SL"."LINEAGE_ID")
           filter("SL"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      16 - filter(:B1>TO_NUMBER(:SYS_B_1))
      18 - filter("DELETED_AT"<=TO_NUMBER(:SOURCE_STATE_ID))
      19 - access("SDE_DELETES_ROW_ID"=:B1 AND "SDE_STATE_ID"=:B2)
           filter("SDE_STATE_ID">TO_NUMBER(:SYS_B_1))
      20 - access("L"."LINEAGE_NAME"=TO_NUMBER(:SOURCE_LINEAGE_NAME) AND
                  "DELETED_AT"="L"."LINEAGE_ID")
           filter("L"."LINEAGE_ID"<=TO_NUMBER(:SOURCE_STATE_ID))
      22 - access("SHAPE"."FID"(+)="V__101"."SHAPE")
    58 rows selected.

    rocr wrote:
    oracle 10.2.0.2.0
    solaris 10
    same query, different databases (cloned from same source), different explain plans.
    db parameters are identical.
    DB1 (production)
    | Id  | Operation                         | Name             | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   113K|    49M|       |  2926   (1)| 00:00:41 |DB2 (staging)
    | Id  | Operation                         | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                  |   145 | 68150 |   401   (1)| 00:00:06 |
    If you check the execution plans it's quite obvious that the two environments can not be identical. If you have the same (amount of) data, then one of the two estimates is way off. Which one is in the right ballpark, how many rows are returned by the query? The same applies to the remaining operation ids of the plan, which estimate is correct?
    It's very likely that the underlying table/index statistics are not the same, and therefore you get different plans.
    By the way, you're using bind variables, therefore the output of the EXPLAIN PLAN is only of limited use, since the actual plan at run time might be completely different due to bind variable peeking and potentially histograms created on some of the columns (which is the default in 10g due to the "FOR ALL COLUMNS SIZE AUTO" method_opt default parameter value).
    If you haven't disabled the pre-configured statistics collection job that runs every night in 10g, you might get different statistics due to this job already.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Database size versus table data size

    I ran the below query that queries all tables in the database and the total size for reserved space is 17GB. The database size is 294GB. Why is there such a big difference in size. I would expect the database to be a little bigger but not 277GB bigger.
    DECLARE @TableName VARCHAR(100)    --For storing values in the cursor
    --Cursor to get the name of all user tables from the sysobjects listing
    DECLARE tableCursor CURSOR FOR  
    select [name] from dbo.sysobjects  where  OBJECTPROPERTY(id, N'IsUserTable') = 1 FOR READ ONLY
    --A procedure level temp table to store the results
    CREATE TABLE #TempTable (     tableName varchar(100),     numberofRows varchar(100),     reservedSize varchar(50),     dataSize varchar(50),     indexSize varchar(50),    
    unusedSize varchar(50) )
    --Open the cursor
    OPEN tableCursor
    --Get the first table name from the cursor
    FETCH NEXT FROM tableCursor INTO @TableName
    --Loop until the cursor was not able to fetch
    WHILE (@@Fetch_Status >= 0) BEGIN     
    --Dump the results of the sp_spaceused query to the temp table     
    INSERT  #TempTable         
    EXEC sp_spaceused @TableName     
    --Get the next table name     
    FETCH NEXT FROM tableCursor INTO @TableName END
    --Get rid of the cursor
    CLOSE tableCursor
    DEALLOCATE tableCursor
    --Select all records so we can use the reults
    SELECT *  FROM #TempTable
    order by 2
    --Final cleanup!
    DROP TABLE #TempTable
    Alan

    Hi anaylor,
    According to your description, the database size is larger than sum of tables sizes. There could be a number of reasons , for example,
    • There may have the large transaction, or a lot of data in the database but it has been removed in some process.
    • Indexes/constraints are being stored in other files.
    •Last database cleanup (including table deletion, record deletion) did not affect any disk reclamation.
    •The initial size of the database is large.
    • Have you calculate unused spaces? Databases usually trade space for speeding and allocating huge amounts of disk space ahead of time, to avoid allocation at transaction time. Space freed by delete may be reused or not due to speed reasons.
    Hope it can help.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Estimating The Database Size before build up

    Hi,
    how can i estimate oracle database size before building up. is there any query or formula there to estimate the size.
    i read a thread of Sir. Joel Pérez if he is available then i m requesting him to send me that docs that you are posted for the estimation query.
    my mail is [email protected]
    Regards
    Avnish

    Use the DBMS_SPACE built-in package to estimate table and index cost (size).
    http://www.psoug.org/reference/dbms_space.html

  • Estimate a database size

    Hi Joel,
    Glad if you could forware me the document for estimated db size.
    Thanks in advance
    Mail ID is : [email protected]

    Hello,
    To know the database size, you may execute the following query:
    Datafiles size:
    select sum(bytes)/(1024*1024) "Mo" from dba_data_files;
    Tempfiles size:
    select sum(bytes)/(1024*1024) "Mo" from dba_temp_files;
    Redolog size:
    select sum(bytes)/(1024*1024) "Mo" from v$log;Then, it lacks the size of the controlfile, SPFILE or PFILE, but in general is just a few Mo.
    Hope this help.
    Best regards,
    Jean-Valentin

Maybe you are looking for

  • Aol always opens as junk mail

    when i receive e-mail from friends who use aol, my i-mail program always categorizes them as junk mail even though i have the sender in my address book. i have checked and the "exception" box for "senders address in my address book" is checked in jun

  • CRM - BW documents/cookbooks

    Hi, Can someone send me CRM - BW documentation/cookbook to [email protected] Will reward points. Thanks in advance Sanju

  • OS X 10.8 crash randomly around 2-6 times a day, kernel panic

    On my mid 2009 macbook pro 13' with os x 10.8, I have been having trouble of random crash around 2-6 times a day. Any ideas? Most crashings happened when I viewing flash video with Firefox 27.0.1. here is the System Diagnostic Report: Thu Mar  6 23:1

  • Location of iPhoto files

    I'm a Mac person for 10 years.  This will be hard to believe but I have never used iPhoto.  That's because I got into the haibit adjusting photos on Photoshop and when I once tried iPhoto many years ago I ended up having so many multiple copies of al

  • Looks like I have pages, but can't open docs

    I have pages app in dock but cannot open docs sent as pages from someone else.  Or do I not have Iwork?