Doubt regarding automatic statistics collection in Oracle 10g

I am using Oracle 10g in Linux
Does statistic collection for tables throughout the database happen automatically or should we manually analyze the tables using
Analyze command or DBMS_STATS package ?
AWR collects statistics(snapshots) every 1 hr but does it mean it collects only session and database related statistics and not the table related statistics?

I am using Oracle 10g in Linux Version and os name and version?
AWR collects statistics(snapshots) every 1 hr butIt's performance related statistics. Read about data gathering and AWR.
Note that AWR is an extra licensable feature thru Management packs.

Similar Messages

  • Statistics Collection in Oracle 10g

    In Oracle 10g gathering table and index statistics are automatic ?
    or we have to physically gather statistics for table and indexes

    It depends how your database is configured -
    PARAMETER statistics_level should be set to typical and there must be a job NAMED as GATHER_STATS_JOB should be active. you can change the job parameters

  • How stop the automatic statistics collection job after the maintenance wind

    Hi,
    we are for a solution to stop the automatic statistics collection job after the maintenance window finished.
    we disable all jobs except the automatic statistics collection, because this is the only one we want to run. Then we define specific values for the interval and duration parameters of the maintenance window to customize this task.
    But for their systems it is very important that this job/task will immediately stop when the window is closed!!!
    So, how could we ensure this behavior.
    For Oracle 10g it is easy because the statistic job always exists and it is possible to set its duration and create an addtional event based job which kills all jobs that are running over duration.
    In Oracle 11g the statistic job is created by the system during the maintenance window is open.
    We are not able to modify parameters of this system job. After the maintenance window closed the job is already running - only with another resource priority - but it is running.
    Please help me in this scenario
    Thanks&Regards
    Prem

    ?So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run, but i see tables are updated still the job is not running. I did >query dba_scheduler_jobs and the state of the job is true and scheduled. Please see my previous post on the output
    Am i missing anything here, do i look for some parameters settings
    So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run,GATHER_STATS_JOB will run and if there are any table in which there's a 10 percent change in data, it will gather statistics on that table. If no table data have changes less than 10 percent, it will not gather statistics.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
    Hope this helps.
    -Anantha

  • How to disable automatic statistics collections on tables

    Hi
    I am using Oracle 10g and we have few tables which are frequently truncated and news rows added to it. Oracle automatically analyzes the table by some means which collects statistics of the table but at the wrong time(when the table is empty). This makes my query to do a full table scan rather using indexes since the statistics was collected when the table was empty.Could any one please let me know how to disable the automatic statistics collection feature of Oracle?
    Cheers
    Anantha PV

    Hi
    I am using Oracle 10g and we have few tables which
    are frequently truncated and news rows added to it.
    Oracle automatically analyzes the table by some means
    which collects statistics of the table but at the
    wrong time(when the table is empty). This makes my
    query to do a full table scan rather using indexes
    since the statistics was collected when the table was
    empty.Could any one please let me know how to disable
    the automatic statistics collection feature of
    Oracle?
    First of all I think it's important that you understand why Oracle collects statistics on these tables: Because it considers the statistics of the object to be missing or stale. So if you just disable the statistics gathering on these tables then you won't have statistics at all or outdated statistics.
    So as said by the previous posts you should gather the statistics manually yourself anyway. If you do so right after loading the data into the truncated table, you don't need to disable the automatic statistics gathering as it only processes objects that are stale or don't have statistics at all.
    If you still think that you need to disable it there are several ways to accomplish it:
    As already mentioned, for particular objects you can lock the statistics using DBMS_STATS.LOCK_TABLE_STATS, or for a complete schema using DBMS_STATS.LOCK_SCHEMA_STATS. Then these statistics won't be touched by the automatic gathering job. You still can gather statistics using the FORCE=>true option of the GATHER__STATS procedures.
    If you want to change the automatic gathering job that it only gathers statistics on objects owned by Oracle (data dictionary, AWR etc.), then you can do so by calling DBMS_STATS.SET_PARAM('AUTOSTATS_TARGET', 'ORACLE'). This is the recommended method.
    If you disable the schedule job as mentioned in the documentation by calling DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB') then no statistics at all will be gathered automatically, causing your data dictionary statistics to be become stale over time, which could lead to suboptimal performance of queries on the data dictionary.
    All this applies to Oracle 10.2, some of the features mentioned might not be available in Oracle 10.1 (as you haven't mentioned your version of 10g).
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Regarding MOSD 454811.1 ( Upgrading OracleAS 10g Forms and Reports in Oracl

    I Installed R12.1.1 and now upgrading it to 12.1.3. I am following document 1080973.1.
    As per MOSD 1080973.1, We need to upgrade Upgrading to the Latest OracleAS 10g 10.1.3.x Patch Set in Oracle E-Business Suite Release 12.
    Currently Version is 10.1.2.3 and in the document it's written that after applying all the patches, Chk that version should be 10.1.2.3
    Do I really need 10G AS form & report upgradation ?

    Hi..10.1.3.X is for IAS ORACLE HOME. I am asking about FORMS & REPORT HOMESorry, I got confused with your line --> "As per MOSD 1080973.1, We need to upgrade Upgrading to the Latest OracleAS 10g 10.1.3.x Patch Set in Oracle E-Business Suite Release 12. "
    Currently Version is 10.1.2.3 and in the document it's written that after applying all the patches, Chk that version should be 10.1.2.3
    Do I really need 10G AS form & report upgradation ?Yes, you need it. As mentioned in the doc "If customers are already on 10.1.2.3.0, follow instructions in Step 3.2 to apply the bundle patch.".
    Thanks,
    Hussein

  • Query Regarding Rich Text Editor in Oracle 10G

    Hello.
    Can anyone let me know is their any privilege in Oracle 10g that we Incorporate the Rich Text Editor functionality. Currently we are working on Laboratory / Radiology Template based Reports in which they are requesting their should be option through which we can simply Cut and Paste our organized TEXT(REPORT) which are formatted in MS WORD with Bold,Underline and in Bullets format, it should simply paste in Editor and we can view a Template based report with formatted REPORT.
    We are using Oracle 10G and it's Applet based Application. Any clue how can we Accomplish this? Any Suitable Suggestion?
    Thanks

    Sorry, I referred this already.. This also returns the HTML text. But i don't want the HTML text. I want Normal Text what i enter in the Editor. But as of now all the editors are returning HTML text. So in the front end also it is showing HTML text only.
    I entered the text in Editor as
    System Defaulted Note
    Quote entered
    But editor returns as below and the same way it is showing in the Front end application instead of above text.
    <html>
    <head>
    </head>
    <body>
    System Defaulted Note
    <p>
    Quote entered
    </p>
    </body>
    </html>

  • Automatic Checkpoint Tuning in Oracle 10g

    Hi ,
    How to confirm if the database has been configured for automatic checkpoint tuning...????
    Many thanks...
    Sim

    The log_checkpoint_timeout (default 1800) gives Oracle a time-based target, and the log_checkpoint_interval (default 0, meaning the action is based on the size of the current redo log file) give Oracle a 'volume-based' target.
    The target affects the rate at which the database writer writes dirty blocks to disk. Every three seconds the database writer wakes up and checks the tail-end of the checkpoint queue and writes out any blocks that were attached to the queue too far in the past.
    In this context, "too far in the past" means either "more seconds in the past than the[i] log_checkpoint timeout" or "made dirty by a change described in a redo block more than log_checkpoint_interval blocks back from the current block".
    If you set fast_start_mttr_target to a non-zero number of seconds then Oracle tries to treat that as a request to write out dirty blocks sufficiently rapidly that crash recovery will take no more than that number of seconds. In effect this makes Oracle change the internal value of log_checkpoint_interval and log_checkpoint_timeout dynamically every few seconds.
    Recoverty requires Oracle to apply the redo log from a known point - which means reading and applying a certain amount of redo to a number of "out of synch" blocks that have to be read from disk. So the fast_start_mttr_target code is constantly calculating how much redo would have to be read and applied, and how many data blocks would have to be read and fixed - and writing dirty blocks fast enough to make it possible to do that work within the given time limit.
    Setting the parameter to zero is (as it is with many numerical parameters) equivalent to not setting it at all. If you try to set the parameter to a very small value (say 30 seconds) you may end up finding lots of messages in your alert log saying something like: "I can't honour your request to recover in 30 seconds, the best I can do is XXX".
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Doubts regarding item categories load in oracle inventory

    Hi All,
    I have to import item categories+ into oracle base tables. Kindly guide me in following aspects.
    1) what are all the mandatory columns in staging table
    2) what are all the interface tables should i use to import item categories
    3) what are the APIs i should call to load data from interface tables to oracle base table
    4)what are all the base tables that would be affected by this load
    I dont have metalink account.. so please dont ask me to refer metalink.
    I have searched a lot.. but couldnt find any complete solution. please kindly provide me the exact solution.

    Hi,
    Pre-requisites:
    Creating an Organization
    Code Combinations
    Templates
    Defining Item Status Codes
    Defining Item Types
    1) what are all the mandatory columns in staging table
    MTL_SYSTEM_ITEMS_INTERFACE:
    PROCESS_FLAG = 1 (1= Pending, 2= Assign Complete, 3= Assign/Validation Failed, 4= Validation succeeded; Import failed, 5 = Import in Process, 7 = Import succeeded)
    TRANSACTION_TYPE = ‘CREATE’, ‘UPDATE’
    SET_PROCESS_ID = 1
    ORGANIZATION_ID
    DESCRIPTION
    ITEM_NUMBER and/or SEGMENT (n)
    MATERIAL_COST
    REVISION
    TEMPLATE_ID
    SUMMARY_FLAG
    ENABLED_FLAG
    PURCHASING_ITEM_FLAG
    SALES_ACCOUNT (defaulted from
    MTL_PARAMETERS.SALES_ACCOUNT)
    COST_OF_SALES_ACCOUNT (defaulted from MTL_PARAMETERS.COST_OF_SALES_ACCOUNT)
    MTL_ITEM_CATEGORIES_INTERFACE:
    INVENTORY_ITEM_ID or ITEM_NUMBER.
    ORGANIZATION_ID or ORGANIZATION_CODE or both.
    TRANSACTION_TYPE = 'CREATE' ('UPDATE' or 'DELETE' is not possible through Item Import).
    CATEGORY_SET_ID or CATEGORY_SET_NAME or both.
    CATEGORY_ID or CATEGORY_NAME or both.
    PROCESS_FLAG = 1
    SET_PROCESS_ID (The item and category interface records should have the same set_process_id, if you are importing item and category assignment together)
    MTL_ITEM_REVISIONS_INTERFACE:
    INVENTORY_ITEM_ID or ITEM_NUMBER (Must match the
    ORGANIZATION_ID or ORGANIZATION_CODE or both
    REVISION
    CHANGE_NOTICE
    ECN_INITIATION_DATE
    IMPLEMENTATION_DATE
    IMPLEMENTED_SERIAL_NUMBER
    EFFECTIVITY_DATE
    ATTRIBUTE_CATEGORY
    ATTRIBUTEn
    REVISED_ITEM_SEQUENCE_ID
    DESCRIPTION
    PROCESS_FLAG = 1
    TRANSACTION_TYPE = 'CREATE'
    SET_PROCESS_ID = 1
    Each row in the mtl_item_revisions_interface table must have the REVISION and EFFECTIVITY_DATE in alphabetical (ASCII sort) and chronological order.
    2) what are all the interface tables should i use to import item categories
    MTL_SYSTEM_ITEMS_INTERFACE
    MTL_ITEM_REVISIONS_INTERFACE (If importing revisions)
    MTL_ITEM_CATEGORIES_INTERFACE (If importing categories)
    MTL_INTERFACE_ERRORS (View errors after import)
    3) what are the APIs i should call to load data from interface tables to oracle base table
    1. EGO_ITEM_PUB can be used to Create / Update items.
    This API will update mtl_system_items_interface and mtl_interface_errors if problems occur.
    The following procedure may be used to facilitate initial testing and debugging of EGO_ITEM_PUB:
    SET SERVEROUTPUT ON
    DECLARE
    l_item_table EGO_Item_PUB.Item_Tbl_Type;
    x_item_table EGO_Item_PUB.Item_Tbl_Type;
    x_Inventory_Item_Id mtl_system_items_b.inventory_item_id%TYPE;
    x_Organization_Id mtl_system_items_b.organization_id%TYPE;
    x_return_status VARCHAR2(1);
    x_msg_count NUMBER(10);
    x_msg_data VARCHAR2(1000);
    x_message_list Error_Handler.Error_Tbl_Type;
    BEGIN
    --Setting FND global variables.
    --Replace MFG user name with appropriate user name.
    FND_GLOBAL.APPS_INITIALIZE(USER_ID=>&userid,RESP_ID=>NULL,RESP_APPL_ID=>NULL);
    --FIRST Item definition
    l_item_table(1).Transaction_Type := 'CREATE'; -- Replace this with 'UPDATE' for update transaction.
    l_item_table(1).Segment1 := 'TEST1';
    l_item_table(1).Description := 'TEST ITEM';
    l_item_table(1).Organization_Code := '&masterorg';
    l_item_table(1).Template_Name := '&template';
    l_item_table(1).Inventory_Item_Status_Code := 'Active';
    l_item_table(1).Long_Description := 'Create test item';
    DBMS_OUTPUT.PUT_LINE('=====================================');
    DBMS_OUTPUT.PUT_LINE('Calling EGO_ITEM_PUB.Process_Items API');
    EGO_ITEM_PUB.Process_Items(
    p_api_version => 1.0
    ,p_init_msg_list => FND_API.g_TRUE
    ,p_commit => FND_API.g_TRUE
    ,p_Item_Tbl => l_item_table
    ,x_Item_Tbl => x_item_table
    ,x_return_status => x_return_status
    ,x_msg_count => x_msg_count);
    DBMS_OUTPUT.PUT_LINE('==================================');
    DBMS_OUTPUT.PUT_LINE('Return Status ==>'||x_return_status);
    IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
    FOR i IN 1..x_item_table.COUNT LOOP
    DBMS_OUTPUT.PUT_LINE('Inventory Item Id :'||to_char(x_item_table(i).Inventory_Item_Id));
    DBMS_OUTPUT.PUT_LINE('Organization Id :'||to_char(x_item_table(i).Organization_Id));
    END LOOP;
    ELSE
    DBMS_OUTPUT.PUT_LINE('Error Messages :');
    Error_Handler.GET_MESSAGE_LIST(x_message_list=>x_message_list);
    FOR i IN 1..x_message_list.COUNT LOOP
    DBMS_OUTPUT.PUT_LINE(x_message_list(i).message_text);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE('==================================');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('Exception Occured :');
    DBMS_OUTPUT.PUT_LINE(SQLCODE ||':'||SQLERRM);
    DBMS_OUTPUT.PUT_LINE('=====================================');
    END;
    2. INV_ITEM_CATEGORY_PUB can be used to Create / Update category assignments.
    11.5.9 customers can apply patch 4088037 to introduce Update functionality for this API.
    3. INV_ITEM_CATALOG_ELEM_PUB can be used for importing item catalog descriptive element value assignments. This functionality is not available until 11.5.10.
    4)what are all the base tables that would be affected by this load
         MTL_SYSTEM_ITEMS_B
    MTL_ITEM_REVISIONS_B
    MTL_CATEGORIES_B
    MTL_CATEGORY_SETS_B
    MTL_ITEM_STATUS
    MTL_ITEM_TEMPLATES
    Regards,
    Yuvaraj.C

  • Doubt regarding Record Statistics.

    Hi,
    Using an interface, I am updating a row. As per the execution log file, it's showing me No. of Updates as 1. However, No. of Rows is shown as 3. I went through ODI Developer's Guide which mentions about No. of Rows as Total number of rows handled during this session/step/task. There does not seem to be more explanation.
    I would like to know why the Execution log mentions No. of Rows as 3, when I am updating just a single row? There are no inserts and deletes and the log informs the count for them as 0. There are no errors as well.
    Just to explain what I am doing (in SQL terms),
    I have a product table and another table called as product_original which is created as 'create table product_original as select * from product;'
    I have developed an interface to change subgroup value of a particular product (update product set subgroup = 'Club' where code = 1001;)
    The interface is changing subgroup from 'Large' to 'Club' for the particular product code (which is unique).
    All is working fine. However, I am curious to know why the execution log specifies No. of Rows as 3.
    I am using ODI 11.1.1.5 with Oracle as Source and Target technology.
    Thanks in advance.
    Manoj.

    Manoj,
    >
    I went through ODI Developer's Guide which mentions about No. of Rows as Total number of rows handled during this session/step/task
    >
    There are other steps that are also considered when giving this number. This depends on the IKM that you have used.
    eg. IKM Oracle incremental update will copy that row to a temp table, then update that row's flag and finally copy that row to the target table. So, in all 3 operations were done to that single row and hence the number 3.
    I know that its misleading from an ODI interface view.

  • Automatic statistics generation in 11.2

    Dear experts!
    I've initialized the automatic statistics collector in my 11.2 db as follows:
    BEGIN
    DBMS_AUTO_TASK_ADMIN.ENABLE(
    client_name => 'auto optimizer stats collection',
    operation => NULL,
    window_name => NULL);
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.MONDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=MON;byhour=11;byminute=0;bysecond=0');
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.WEDNESDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=WED;byhour=11;byminute=0;bysecond=0');
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.FRIDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=FRI;byhour=11;byminute=0;bysecond=0');
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.THURSDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=THU;byhour=11;byminute=0;bysecond=0');
    DBMS_SCHEDULER.SET_ATTRIBUTE('SYS.TUESDAY_WINDOW', 'repeat_interval', 'freq=daily;byday=TUE;byhour=11;byminute=0;bysecond=0');
    DBMS_STATS.GATHER_SCHEMA_STATS(ownname => 'DBUSER',
    options => 'GATHER AUTO',
    estimate_percent => dbms_stats.auto_sample_size
    END;
    After this initial procedure the automatic maintenance task checks from monday to friday at 11 am if the statistics of the database objects are still ok. For objects with old statistics they are newly generated.
    The first question is with which parameters the automatic maintenance task executes the dbms_stats.gather_... for the objects with old statistics. In my opinion it'll take the same options as specified in the initial procedure (options=GATHER AUTO and estimate_percent=dbms_stats.auto_sample_size). Am I right?
    The second question belongs also to the parameter of the dmbs_stats procedure - but in another context:
    Some used tools generate statistics too after intensive workload, they execute the following:
    execute DBMS_STATS.GATHER_SCHEMA_STATS(ownname => 'DBUSER',
    options => 'GATHER EMPTY',
    estimate_percent => 70
    execute DBMS_STATS.GATHER_SCHEMA_STATS(ownname => 'DBUSER',
    options => 'GATHER STALE',
    estimate_percent => 70
    So what happens to my automatic maintenance task after these two procedure calls? Do these two procedures overwrite the inital provided option (GATHER AUTO) which is required for automatic statistics collection? If yes does it mean that the automatic statistics collector doesn't maintain the database objects any more?
    Thanks for your help!
    Best regards!
    Markus

    1. There is a database and table option called MONITORING. By default this is turned on from 10g. So database is watching for changes and will collect statistics on tables/objects where needed in GATHER AUTO option.
    2. No GATHER AUTO options wont be touched but you recollect stats on objects you specified in function/procedure call. And if those objects wont change in the future AUTO GATHER may wont touch these stats anymore....
    This is a doc reference list I created when I was working on similar issue. :)
    Best Practices for automatic statistics collection on Oracle 10g [ID 377152.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=BULLETIN&id=377152.1
    How to check what automatic statistics collection is scheduled on 10g [ID 377143.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=377143.1
    How To Extend Maintenance Windows For GATHER_STATS_JOB for More Than 8 Hours? [ID 368475.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=368475.1
    Oracle 10g PL/SQL Packages and Types Reference - DBMS_SCHEDULER documentation
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#CIHHBGGI
    Oracle 10g PL/SQL Packages and Types Reference - DBMS_STATS documentation
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#CIHBIEII
    Oracle® Database Performance Tuning Guide 10g Release 2 (10.2) 14 Managing Optimizer Statistics 14.2 Automatic Statistics Gathering
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
    Statistics Best Practices: How to Backup and Restore Statistics [ID 464939.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=464939.1
    Managing CBO Stats during an upgrade to 10g or 11g [ID 465787.1]
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=465787.1

  • Doubt's regarding the Hierarchial Queries in Oracle

    Hi,
    i have a doubt regarding the Hierarchial Queries in Oracle.
    SELECT * FROM TMP_TEST;
    ID     NUMVAL     STRVAL
    1     100     Hello
    1     -100     World
    2     1     Concatenate
    2     2     In String
    2     3     using Connect By
    2     4     Using SYS_CONNECT_BY_PATH
    i am clear with my execution of IN_Line view (mechanism how it work's) .
    But i have also read about the Hierarchial queries in the Oracle product documentation's. i am also aware of the
    SYS_CONNECT_BY_PATH , LEVEL & START WITH , CONNECT BY Keywords.
    But i couldnot able to Manually work out as how this below Query works.
    Can you please explain me how this Hieracial query works ?
    SELECT ID, (SYS_CONNECT_BY_PATH(STRVAL,',')),LEVEL
    FROM
    SELECT ID,STRVAL,ROW_NUMBER() OVER(PARTITION BY ID ORDER BY ID) RNUM,
    COUNT(*) OVER(PARTITION BY ID ORDER BY ID) CNT,NUMVAL
    FROM TMP_TEST
    START WITH RNUM = 1
    CONNECT BY PRIOR RNUM = RNUM - 1
    Many Thanks,
    Rajesh.

    Hi, Rajesh,
    My first message was in response to your first message.
    In your latest message, the query is:
    SELECT  ID, (SYS_CONNECT_BY_PATH(STRVAL,',')),LEVEL
    FROM    (
            SELECT  ID,STRVAL,ROW_NUMBER() OVER(PARTITION BY ID ORDER BY ID) RNUM,
                    COUNT(*) OVER(PARTITION BY ID ORDER BY ID) CNT,NUMVAL
            FROM TMP_TEST
    WHERE   RNUM = CNT
    START WITH  RNUM = 1
    CONNECT BY  PRIOR RNUM = RNUM - 1;It looks like you lost the second CONNECT BY condition:
    AND PRIOR ID = IDPut it back: it's important.
    Now you're confused about the output row:
    2    ,Hello,World,using Connect By,Using SYS_CONNECT_BY_PATH   4It doesn't seem to correspond to anything results that you got when you ran the sub-query alone.
    That's because the resutls from your sub-query may change every time you run it, even though the data doesn't change. The ORDER BY clauses in both of the analytic functions do not result in a complete ordering. In fact, they're completely meaningless. It never makes any sense to PARTITON BY and ORDER BY the same value; "PARTITION BY id" means that only rows with the same id will be compared to each other; you might as well say "ORDER BY 0" or "ORDER BY dmbs_random.value".
    The ORDER BY clause of ROW_NUMBER whould reflect that way in which you want the results to appear within each id, for example:
    ROW_NUMBER () OVER (PARTITION BY id ORDER BY UPPER (strval))Note that this is very similar to what was in my first reply.
    In the COUNT function, why do you want an ORDER BY clause at all? Just say:
    COUNT (*) OVER (PARTITION BY id)

  • Doubt regarding SQL execution

    Hi Friends,
    Am using Oracle 10g DB - 10.2.0.3.0
    I have some basic doubts regarding sql query execution by Oracle.
    Say, Am executing a query from a toad/sqlplus session for the first time, it takes 10 secs then 1 sec and so on.
    Same thing happens for every 15 minutes.(Any specific reason for this ??).
    It takes more time when it executes first because of parsing and all those stuff but from then on it picks from the
    shared pool right??.. How long will it be there in Shared Pool does Oracle maintain any specific time period to clear that query from shared pool memory. How does Oracle handle this.
    Another thing is, say, I have a report query, I run this query monthly. What will be the execution time when I run this query each and every month. Will Oracle parse this query everytime I run. How do I improve the performance in this situation (May sound odd :)).
    Regards,
    Marlon

    Say, Am executing a query from a toad/sqlplus session for the first time, it takes 10 secs then 1 sec and so on.
    Same thing happens for every 15 minutes.(Any specific reason for this ??).
    It takes more time when it executes first because of parsing and all those stuff but from then on it picks from the
    shared pool right??.. How long will it be there in Shared Pool does Oracle maintain any specific time period to clear that query from shared pool memory. How does Oracle handle this. Share Pool caches the SQL statement. So when you execute the same SQL for the second time it goes for a soft parse. But this is not the only reason for the query to execute faster the second time. The time difference between a soft parse and hard parse is very minimal. So it really does not matter unless you are executing the same query several number of times.
    The thing that really matters is the Data Buffer Cache. That is the rows that are selected by your query are cached into the Data buffer that is available in the SGA. So for the next time when you run the same query the IO is reduced as the data is available in the memory and you don't have to go to your disk to get the data.
    But the data in Data Buffer is not persistent, meaning it follows the FIFO rule. That is first in first out. When the Data Buffer is full the content of the buffer is removed in the FIFO order.
    Another thing is, say, I have a report query, I run this query monthly. What will be the execution time when I run this query each and every month. Will Oracle parse this query every time I run. How do I improve the performance in this situation (May sound odd :)). Like the Data Buffer the Shared Pool is also maintained in the FIFO order. So if the query is still in the Shared Pool the query will be soft parsed else it will be hard parsed. But its very rare that you will have a query in your Shared Pool for a month.

  • Oracle 10g on Fedora Core 5

    Is there a pre-packaged version of Fedora Core 5 which includes Oracle 10g for Linux?
    This way, all you have to do is select Install Oracle 10g and it includes any special packages for installing Oracle 10g. Plus, after installation, it automatically starts up the Oracle 10g installer. It could even do the pre-installation stuff such as creating the oracle user. I do not know how, but this oracle user would be the only user using an old gcc compatible with Oracle software. Via its environment maybe?
    Right now, it is a Pain-in-the-neck to install Oracle on Linux. The installation guide Oracle provides is not enough. You have to do a search on the web for pages detailing more info. Or you have to install a special file or set variables to make the Oracle installer think it is installing on Red Hat Enterprise Linux. I have to hide the gcc that comes with Linux and install an old verison of it. At one time, I even had to compile a library so the java installer could run. This is ridiculous, I should not have to jump through hurdles to install Oracle.
    Does anyone out there have such a set of Fedora Core 5 ISO images? Shoot, FC4 would do too.

    No. I'm not particular to Fedora. Fedora has been a distribution which works on my (please don't laugh) emachines computer at home. I've had Oracle 9i enterprise installed on fedora core 3.
    Ubuntu and Debian are good distros as well. I have not been successfull with Suse though.
    Suse in the past -- the installer could not get the graphics correct -- garbage just displays -- so i could never install it. Maybe SuSe 10 has improved since then.
    I found this about Suse and Oracle. So, this may work for me. Otherwise, i will try Centos.
    http://www.novell.com/coolsolutions/tip/16193.html
    Thanks for the info.

  • Can install Oracle 10g release 2 on Windows 2008 R2 Server  64-bit machine

    Hi All,
    Can we install Oracle 10g Release 2 on Windows 2008 Server R2 for 64-bit machine? If yes then is there any patche requirement for this, So suggest me.
    Regards,
    Rizi

    Hi;
    Can we install Oracle 10g Release 2 on Windows 2008 Server R2 for 64-bit machine? If yes then is there any patche requirement for this, So suggest me.Yes you can but you must use 10.2.0.5.0 version. Pelase check below note:
    How to Install Oracle 10.2.0.5 on MS Windows 7 / Windows 2008R2 [ID 1173433.1]
    Regard
    Helios

  • Issue with "Select Distinct" query in Oracle 10g against Oracle 9i

    Hi,
    I would appreciate if some one help me here because it is really urgent.
    We are upgrading our database from 9i to 10g.
    There are the "Select distinct" queries in the code which populated the grid on the applications screens. We found a difference in 9i and 10g the way the result is populated for these queries. If "Select Distinct" query wihtout a order by clause is executed in 9i then the result is automatically sorted. But Oracle 10g does not do this.
    We can change the queries adding order by clause but we are almost at the end of the testing and want to know if there is any way that we can do this from database settings. Would there be any impact of these settings change on overall operation of Oracle 10g?
    I would appreciate if some one can help me here.
    Thanks,
    Dinesh

    then the result is automatically sorted.No. Oracle may have done a sort operation to perform the distinct, but it still did not guarantee the order of your results.
    In 10g and in 9i, if you want your results in a certain order you must use order by.

Maybe you are looking for

  • SQL Server Reporting Services Licensing

    What end user licensing is required for a deployed SSRS solution? Is a run time execution license required for end users, and does it vary on whether or not they can amend run time parameters?

  • Getting error when installing CR XI R2 Service Pack 5

    I am getting an error when installing CR XI R2 SP5 (cabinet file m148.cab missing or corrupt). I am downloading it from the Downloads section of the SAP Community Network. Does anyone know where I can get another copy of this service pack?

  • Reconcile user data in child tables in OIM

    Hello, I have a Oracle Table (i.e. Employee) contains employee records. An employee has a multiple department IDs and its details and this is stored as different records in the source table. For example in the below table there are two different entr

  • Opening up damaged/corrupted JPEG files

    I've recently had a bunch of JPEG pictured transferred from a damaged external drive, and when I try to open some of the with Apple's "Preview" it tells me that file can't be opened because it is damaged or in a file format that is not recognized.  I

  • Kt4 ultra fanspeed

    Hi! is there a software to control my fan speed?It's too noisy! I've tried one or two soft. but they only monitor the speed and doesn't slow it down.