Sort_area

hiiiii
NAME_COL_PLUS_SHOW_PARAM                                                       
VALUE_COL_PLUS_SHOW_PARAM
sort_area_retained_size                                                          integer     0
sort_area_size                                                                   integer     65536
SQL> do above setting affects the performance of any query?

Instead of wiating, if you check in google you will articles like AskTom's
And for latest info, read docs and docs
Edited by: jeneesh on Nov 14, 2012 3:59 PM

Similar Messages

  • Alter sort_area size

    how change sort_area_size in oracle 8.1.0
    unable to change from enterprise manager console and from pfile

    how change sort_area_size in oracle 8.1.0
    unable to change from enterprise manager console and
    from pfileIf you want to change the value at the pfile, just do so, edit the pfile and restart the instance. Keep in mind that 8i behaves differently than 9i, 8i relies on a text parameter file that can be anywhere, so if you change it from enterprise manager and you store this configuration, it doesn't mean it'll be stored at the default pfile. Just make sure when you start your instance, you explicitly mention the pfile you have modified with the new sort_area_size value.
    ~ Madrid

  • Query Related to Oracle Inventory

    I have to prepare a report in Oracle Inventory (R12) where I have to extract below fields
    1. Inventory Quantity Sold for previous days and weekly basis etc
    2. Quantity Physically on a shelf at a distribution center but commited to end customer
    3. Quantity transfeerd from one or more distribution center within distributor
    4. Quantity on order with manufacturer but not yet received
    5.Quantity Intransit (Intercompany Transfer to the location)
    But I am unable to derive those fields. Please help me to build the query to fetch those fields.

    should I remove those PGA configuration and make it manually for sort_area,hash_join and workarea policy?Well, it depends on your database.
    First, check statspack/awr and see if you are doing "disk sorts", and check your ratio of nested loop joins to hash joins:
    http://www.dba-oracle.com/t_viewing_cpu_ram_io_costs.htm
    Manual setting "alter session" commands, is, well, manual, and it would be best to let Oracle take care of it, IMHO.
    Hope this helps. . .
    Don Burleson
    Oracle Press author

  • Media recovery issue

    Hello
    Why is media recovery is faster than, normal DML,DDL,etc?
    In production database, It took 1 hour to rebuild indexes and move some objects to diffrent tablespace.
    However, When I apply the archivelog of these changes to standby, it took about 20 minutes.
    What is reason for this?
    Cheers

    Media Recovery / Physical Standby operations are faster because they actually only write the final results.
    For example, in the index rebuild case, the operations doing the SQL are
    a. read table, get column values from table
    b. sort values
    c. if allocated pga/sort_area is insufficient, overflow to disk
    d. run final sort pass, if necessary
    e. write sorted results to the index segment
    (recursive SQLs to allocate extents, update the data dictionary for the index definition also have to be applied, each of these also having to read the existing extent maps and data dictionary before updating them).
    However, when you run media recovery
    1. Oracle does not have to read the table
    2. There is no sort operation
    3. Writes to temp are avoided (as Temp operations are nologging and there is nothing in the redo to "replay" against the tempfiles)
    4. The index blocks are "updated" directly

  • Tuning an  insert query

    Hi,
    I have ...
    1)a big table(base table ) (60 columns.. 10,00,000 ). And
    2)a procedure(test_pro).
    This test_pro populates a table by insert and store only the PK of base table and user's session id (SID).
    so this is something happening.......
    exec test_pro .. takes 4-7 sec... i want it to be 1-2 sec.
    "CAN ANYONE PLEASE TUNE MY PROCEDURE "
    base table..
    col(1)PK col(2) col(3)................col(60)
    1 aa ss dd
    2 ww ew ee
    10,00,000 nn mm bb
    id_store_table
    id SID
    1 session(1)
    2 session(1)
    1 session(2)
    4 session(2)
    create or replace procedure
    test_pro(id IN varchar2) as
    begin
    insert into <TABLE> select oid , id from (
    SELECT order_line_id oid FROM <BASE TABLE>
    WHERE <--- > ORDER BY <---COLUMN---- >);
    end;
    thanks all.

    Ten million rows is a lot of data to process. However, you can speed up the insert by removing the ORDER BY clause in the SELECT statement. This would remove a sort from the process which should save a lot of time.
    If you really need the ordering (business decison) then you may need to tune the SORT_AREA.
    You could also ensure that the ID_STORE_TABLE is big enough to take 10,000,000 rows.
    However, it now occurs to me to ask: WHY? Creating 10000000 row tables is not the sort of thing to me doing on the fly, so why does it matter if it takes 2 seconds or 7?
    Cheers, APC

  • Database duplication

    Hi
    I'm trying to restore production to a different mount point which is a brand new server.And mount points of the production to that of new server is totally different.
    It is 9.2.07 on solaris , both servers have different file systems
    SO, I'm little confused about redo logs creation.
    I'm restoring it through rman where my backup is on tape.
    NOTE:I'm not doing database duplication.I'm restoring the database through rman until certain SCN.
    Below is my rman script and steps I've followed till mounting the database.
    Steps on NEW server
    RMAN > connect target /
    connect catalog rman@rman
    set dbid=xxxxxxx
    startup nomount pfile=$ORACLE_HOME/dbs/intx.ora
    Restore controlfil to '/u10/oradata/shark/control01.ctl';
    alter database mount;
    It worked perfectly till here....
    Now My rman scripts looks this way
    run{
    allocate channel c1 TYPE 'SBT_TAPE';
    allocate channel c2 type 'SBT_TAPE';
    allocate channle c3 type 'SBT_TAPE';
    SEND 'NB_ORA_SERV=clash, NB_ORA_CLIENT=shark';
    set newname for datafile 1 to '/u02/oradata/shark/system01.dbf';
    set newname for datafile 2 to '/u02/oradata/shark/webuser_data01.dbf';
    set newname for datafile 3 to '/u02/oradata/shark/webuser_indx01.dbf';
    set newname for datafile 5 to '/u02/oradata/shark/drsys01.dbf';
    set newname for datafile 6 to '/u02/oradata/shark/tools01.dbf';
    set newname for datafile 7 to '/u02/oradata/shark/users01.dbf';
    restore (database);
    SWITCH DATAFILE ALL;
    I want to do recovery later....
    Now whats the status of redo logs ...where would it be created,..since the file system being different where should I mention rman to create the logs....
    Please advice..If I'm unclear please do let me know...
    Edited by: ORA_DBA2 on May 14, 2009 10:44 AM

    ORA_DBA2 wrote:
    I'm still get this though I set the parameter
    sql ' alter session set sort_area_size=120';
    sql ' alter session set sort_area_retained_size=200';
    resync got ORA-1220, retrying with sort_area_size = 170MB
    resync got ORA-1220, retrying with sort_area_size = 180MB
    resync got ORA-1220, retrying with sort_area_size = 190MB
    resync got ORA-1220, retrying with sort_area_size = 200MB
    resync got ORA--1220, giving upSo how did you arrive at setting sort_area to 120? We see right here that a sort_area_size of 200mb wasn't enough, so your setting of '120' was insufficient from the git-go. And sort_area_retained should generally be the same or smaller than sort_area_size. Read up on both of those in the REFERENCE manual.
    Also, I'd set those in the init.ora file that you reference on db startup.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of sql command at 05/14/2009 11:17:45
    RMAN-03014: implicit resync of recovery catalog failed
    RMAN-03009: failure of partial resync command on default channel at 05/14/2009 11:17:45
    ORA-01220: file based sort illegal before database is open

  • PSAPTEMP default storage (Parameter settings)

    Hi there,
    I am trying to increase INITIAL and NEXT values for default setting of PSAPTEMP. Using sapdba version 9, under Tablespace, when I select the INITIAL and change value, the value gets reset to default 1024K. How can I extend these values. Do I need to drop and recreate or can I do it online.
    Regards,
    Jeet

    Dear Jeet,
    first of all: don't use sapdba anymore.
    It's not developed anymore and the recommendated tool is now br*tools.
    See note
    12741 - Current versions of SAPDBA and BR*Tools
    for details
    Concerning your question:
    When you've got a locally managed temp. tablespace (as it is recommended) then the INITIAL and NEXT values should be identical and the allocation type for the tablespace should be UNIFORM.
    The exact value for this parmeters depends on the sort_area-size used in the database.
    The formula looks like this:
    ( N * sort_area_size ) + 2 * db_block_size
    db_block_size is 8K in SAP systems and the N depends on the size of your PSAPTEMP (tempsize):
    N = 1  :  tempsize <= 2 GB         
    N = 3  :  2 GB < tempsize <= 6 GB  
    N = 5  :  6 GB < tempsize <= 10 GB 
    N = 10 :  10 GB < tempsize         
    All this - in more detail - can be found in these notes:
    164925 - Storage parameter of tablespace PSAPTEMP
    659946 - FAQ: Temporary tablespaces
    Hope that helps.
    Best regards, Lars

  • Order by cause query to hang

    Dear all,
    I have a simple query to join two tables. Table schema are as follows
    ==============================================
    Table A
    id number,
    name varchar(32)
    Table B
    account_id reference Table A(id)
    login varchar(32),
    password varchar(32)
    ==============================================
    In CGI, my run these test queries.
    No order statement and select 3 columns.
    1. Select a.name, b.login,b.password
    From TableA a, TableB b
    Where a.id=b.account_id;
    ====>OK
    With order statement and select 3 columns, 2 from table B.
    2. Select a.name,b.login,b.password
    From TableA a, TableB b
    Where a.id=b.account_id
    Order by a.name;
    ==>BAD, CGI never returns.
    With order statement and select 2 columns, 1 from table B.
    3. Select a.name,b.login
    From TableA a, TableB b
    Where a.id=b.account_id
    Order by a.name;
    ==>OK
    With order statement and select 3 columns, 2 from table A.
    4. Select a.id, a.name,b.login
    From TableA a, TableB b
    Where a.id=b.account_id
    Order by a.name;
    ==>BAD. CGI never returns.
    Without order statement and select 3 columns, 2 from table A.
    4. Select a.id, a.name,b.login
    From TableA a, TableB b
    Where a.id=b.account_id;
    ==>BAD. CGI never returns
    ======================================================
    It appears to me that if i use more system resources by selecting more columns or use order statement, query will not return.
    Can someone help?
    Thanks

    Check execution plan of your query.
    if query id joined in hash join then provide hint for nested loop
    if query is joined in sort merge join the create index on respective columns
    if both of methods are not working then
    check you init.ora paremeter sort_area size and sort_area_retain size. if they are less then increase the size.
    u can select above parameter from V$PARAMETER dynamic view
    select * from v$parameter where name like 'sort%'
    Regards
    Juned

  • Sort_area_size & pga_aggregate_target

    Hi,
    There is an ETL load job which is failing frequently because of TEMP tablespace issue. I have already extended the temp tablespace from about 6GB to 37GB.
    Code is definately an issue. However we can not possibly change it.
    I wanted to know what is the difference between sort_area_size and pga_aggregate_target? Can someone please explain these and the scenrios when we need to set which parameter?
    Current Environment:
    Oracle Database: 10.2.0.3
    Platform: HP-UX
    SQL> show parameter sort_area
    NAME TYPE VALUE
    sort_area_retained_size integer 1524288
    sort_area_size integer 1524288
    SQL> show parameter pga_aggregate
    NAME TYPE VALUE
    pga_aggregate_target big integer 524288000
    SQL> select sum(bytes)/1024/1024/1024 db_size_gb from dba_data_files;
    DB_SIZE_GB
    108.447266
    SQL> select sum(bytes)/1024/1024/1024 db_size_gb from v$tempfile;
    DB_SIZE_GB
    37.109375
    SQL>
    Regards
    Sudhanshu

    pga_aggregate_target is set and automatically sets workarea_size_policy = auto. It is used for sorts, hash joins etc operations. But it is set for all db level and a single session cannot use more than ~5% of it. So if you have one session that has many memory intensive memory operations it might be very useful to set workarea_size_policy = manual and set big sort/hash_area_sizes. Available mmemory VERY MUCH affects large sorts and hash_joins, for exact example how much - you can look at my article Long running Operations in Oracle (entries in v$session_longops) at http://www.gplivna.eu/papers/v$session_longops.htm under the chapter Hash joins can either fly or crawl.
    Gints Plivna
    http://www.gplivna.eu

  • Batch processing PGA memory settings.

    I was tweaking the 'area' parameters for my batch processing run on the database (as Oracle suggested here).
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams202.htm#sthref833
    You might want to adjust this parameter for decision support systems, batch jobs, or large CREATE INDEX operations.The one thing I noticed is when I increase sort_area_size (in manual mode), why is it that the hash_area_size automatically became twice the size of sort_area? But this doesn't happen the other way around?
    XX@d > sho parameter area
    NAME                                 TYPE        VALUE
    bitmap_merge_area_size               integer     1048576
    create_bitmap_area_size              integer     8388608
    hash_area_size                       integer     131072
    sort_area_retained_size              integer     0
    sort_area_size                       integer     65536
    workarea_size_policy                 string      AUTO
    XX@d > alter session set workarea_size_policy=manual;
    Session altered.
    Elapsed: 00:00:00.00
    XX@d > sho parameter area
    NAME                                 TYPE        VALUE
    bitmap_merge_area_size               integer     1048576
    create_bitmap_area_size              integer     8388608
    hash_area_size                       integer     131072
    sort_area_retained_size              integer     0
    sort_area_size                       integer     65536
    workarea_size_policy                 string      MANUAL
    XX@d > alter session set sort_area_size=1024000;
    Session altered.
    Elapsed: 00:00:00.01
    XX@d > sho parameter area
    NAME                                 TYPE        VALUE
    bitmap_merge_area_size               integer     1048576
    create_bitmap_area_size              integer     8388608
    hash_area_size                       integer     2048000
    sort_area_retained_size              integer     0
    sort_area_size                       integer     1024000
    workarea_size_policy                 string      MANUAL
    XX@d > alter session set hash_area_size=4096000;
    Session altered.
    Elapsed: 00:00:00.01
    XX@d > sho parameter area
    NAME                                 TYPE        VALUE
    bitmap_merge_area_size               integer     1048576
    create_bitmap_area_size              integer     8388608
    hash_area_size                       integer     4096000
    sort_area_retained_size              integer     0
    sort_area_size                       integer     1024000
    workarea_size_policy                 string      MANUALI also have a similar post in here, but, thought of opening another thread since the question is different:
    Manual pga management for Batch processing.

    Because by default it is 2*sort_area_size
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96536/ch172.htm
    And sort_area_size by default is 65536
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1198.htm
    Gints Plivna
    http://www.gplivna.eu
    Message was edited by:
    gintsp
    Added info about sort_area_size

Maybe you are looking for