How to effectively manage large table which is rapidly growing

All,
My environment is single node database with regular file system.
Oracle - 10.2.0.4.0
IBM - AIX
A tablespace in this database is growing rapidly. Especially a single table in that tablespace having "Long Raw" column datatype has grown from 4 GBs to 900 GBs in 6 months.
We had discussion with application team and they mentioned that due to acquisitions, data volume is increased and we are expecting it to grow up to 4 TBs in next 2 years.
In order to effectively manage the table and to avoid performance issues, we are looking for different options as below.
1) Table is having date column. With that thought of converting to partitioned table like "Range" partitioning. I never converted a table of 900 GBs to a partitioned table. Is it a best method?
     a) how can I move the data from regular table to partitioned table. I looked into google, but not able to find good method for converting to regular table to partitioned table. Can you help me out / share best practices?
2) In one of the article, I read, BLOB is better than "Long RAW" datatype, how easy is to convert from "Long RAW" datatype. Will BLOB yield better performance and uses disk space effectively?
3) Application team is having purging activity based on application logic. We thought of using shrinking of tables option with enable row movement- "alter table <table name> shrink space cascade". But it is returning the error that table contains "Long" datatype. Any suggestions.
Any other methods / suggestions to handle this situation effectively..
Note: By end of 2010, we have plans of moving to RAC with ASM.
Thanks

To answer your question 2:
2) In one of the article, I read, BLOB is better than "Long RAW" datatype,
how easy is to convert from "Long RAW" datatype. Will BLOB yield better
performance and uses disk space effectively?Yes, LOBs, BLOBs, or CLOBs are (supposed) to be better than raws (or long raws). In addition, I believe Oracle has or will shortly be desupporting the use of long raws in favor of LOBs, CLOBs, or BLOBs (as appropriate).
There is a function called "to_lob" that you have to use to convert. Its a pain because you have to create the second table and then insert into the second table from the first table using the 'to_lob' function.
from my notes...
=================================================
Manually recreate the original table...
Next, recreate (based on describe of the table), except using CLOB instead of LONG:
SQL> create table SPACER_STATEMENTS
2 (OWNER_NAME VARCHAR2(30) NOT NULL,
3 FOLDER VARCHAR2(30) NOT NULL,
4 SCRIPT_ID VARCHAR2(30) NOT NULL,
5 STATEMENT_ID NUMBER(8) NOT NULL,
6 STATEMENT_DESC VARCHAR2(25),
7 STATEMENT_TYPE VARCHAR2(10),
8 SCRIPT_STATEMENT CLOB,
9 ERROR VARCHAR2(1000),
10 NUMBER_OF_ROWS NUMBER,
11 END_DATE DATE
12 )
13 TABLESPACE SYSTEM
14 ;
Table created.
Try to insert the data using select from original table...
SQL> insert into SPACER_STATEMENTS select * from SPACER_STATEMENTS_ORIG;
insert into SPACER_STATEMENTS select * from SPACER_STATEMENTS_ORIG
ERROR at line 1:
ORA-00997: illegal use of LONG datatype
That didn't work...
Now, lets use TO_LOB
SQL> insert into SPACER_STATEMENTS
2 (OWNER_NAME, FOLDER, SCRIPT_ID, STATEMENT_ID, STATEMENT_DESC, STATEMENT_TYPE, SCRIPT_STATEMENT, ERROR, NUMBER_OF_ROWS, END_DATE)
3 select OWNER_NAME, FOLDER, SCRIPT_ID, STATEMENT_ID, STATEMENT_DESC, STATEMENT_TYPE, TO_LOB(SCRIPT_STATEMENT), ERROR, NUMBER_OF_ROWS, END_DATE
4 from SPACER_STATEMENTS_ORIG;
10 rows created.
works well...
===============================================================

Similar Messages

  • How to rotate a large table

    I'm building a long technical report with Pages'08.
    There are many tables in this report.
    This document is in portrait format.
    In the middle of this document I have a particularly large
    table which can't be read if I try to stay on a portrait
    presentation of this table: too many columns (15).
    Hence I'd like to find an easy way to either rotate
    the page or the table so as to be able to use larger
    columns.
    I discovered that Pages'08 doesn't permit to put one
    page in landscape format. I also abandonned the idea of
    using 3 different documents (part 1 in portrait,
    part 2 in landscape, part 3 in portrait again).
    I have to chain the paragraph numbers.
    I have to make a table of content at the end of
    this technical report.
    What is the most efficient way to manage to fill this large
    table.
    Word let me do this, but unfortunately it does also
    make me spend toomuch time on other simple and basic functions.
    Is Pages'09 better on this basic and frequent need (at least for my job)?
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

    Peggy wrote:
    You can rotate a floating table, but it can be a problem if you need to edit the table. It will auto-rotate to portrait to edit it but it can be difficult to see or get to the outside edges. I find it easiest to copy & paste the table into a landscape document the copy it back after editing.
    Thank you for the nice hint.
    I finally choosed to work on a temporary document in A3 format,
    and keep it open so as to be able to quickly copy my table in the
    main document every time I update it.
    During this copy operation I noticed a boring problem:
    as the text column in my main document is slightly smaller than my table,
    Pages decide to shrink it every time, and I can't recover it's
    original size (which I penibly tuned up in my A3 document).
    Hence all the cell contents are partially hidden.
    The button:
    Inspector > Metrics > Original Size
    is off.
    Do you know how to circumvent this bad habit of Pages to resize my
    imported table?
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

  • How can i retrive a table which is dropped by mistake

    hi
    how can i retrive a table which is dropped by mistake?
    Ragards Josh

    Please mention your database version?
    Suppose that a table as follows is dropped;
    SQL> drop table hr.departments cascade constraints;
    Table dropped.We can recover as follows;
    SQL> flashback table hr.departments to before drop;
    Flashback complete.Now we check that the dropped table has been retrieved;
    SQL> select object_name, object_type from dba_objects
    2     where owner='HR';
    OBJECT_NAME
    OBJECT_TYPE
    DEPARTMENTS
    TABLEFLASHBACK TABLE
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9012.htm#sthref8923
    Overview of Oracle Flashback Table
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm#i1015145
    When to Use Oracle Flashback
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm#sthref2426
    Extracted from the link above
    Flashback Table is a push button solution to restore the contents of a table to a given point in time.
    Using Flashback Drop and Managing the Recycle Bin
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#sthref2381
    Adith

  • How to create a Z* table which can maintain through SM30?

    How to create a Z* table which can maintain through SM30? Thanks!

    This question had been asked millions of times...you just need to search the forums...
    Quick hint...goto SE11...the utilities menu and then Table Maintenance Generator.
    Greetings,
    Blag.

  • How to subdivide 1 large TABLE based on the output of a VIEW

    I am searching for a decent method / example code to subdivide a large table (into a global temp table (GTT) for further processing) based on a list of numeric/alphanumeric which is the resultset from a view.
    I am groping with the following strategy in PL/SQL:
    1 -- set up cursor, execute the view (so I have the list of identifiers)
    2 -- create a second cursor (or loop?) which:
    accepts each of the identifiers in turn
    executes a query (EXECUTE IMMEDIATE?) on the larger table
    INSERTs (or appends?) each resultset into the GTT
    3 -- Then the GTT contains just the requires subset of the larger table for further processing and eventual import into iReport for reporting.
    Can anyone point me to code that would "spoon feed" me on this? Or suggest the best / better way to go about it?
    The scale of the issue here -- GTT is defined and ready to go, the larger table contains approx 40,000 rows and I need to extract a dozen subsets or so which add up to approx 1000 rows.
    Thanks,
    Rob

    Welcome to the forum!
    >
    I am searching for a decent method / example code to subdivide a large table (into a global temp table (GTT) for further processing) based on a list of numeric/alphanumeric which is the resultset from a view.
    Can anyone point me to code that would "spoon feed" me on this? Or suggest the best / better way to go about it?
    The scale of the issue here -- GTT is defined and ready to go, the larger table contains approx 40,000 rows and I need to extract a dozen subsets or so which add up to approx 1000 rows.
    >
    No - there is no code to point you to.
    As many of the previous responses indicate part of the concern is that you seem to have already chosen and partially implemented a solution but the information you provided makes us question whether you have adequately analyzed and defined the actual problem and processing that needs to happen. Here's why I have questions about your approach
    1. GTT - a red flag issue - these tables are generally not needed in Oracle. So when you, or anyone says they plan to use one it raises a red flag. People want to be sure you really need one rather than not using a table at all, or just using a regular table instead of a GTT.
    2. Double nested CURSOR loops - a DOUBLE red flag issue - this is almost always SLOW-BY-SLOW (row-by-row) processing at its worst. It is seldom needed, doesn't perform well and won't scale. People are going to question this choice and rightfully so.
    3. EXECUTE IMMEDIATE - a red flag issue or at least a yellow/warning flag. This is definitely a legitimate methodology when it is needed but may times developers resort to it when it isn't needed because it seems easier than doing the hard work of actually defining ALL of the requirements. It seems easier because it appears that it will allow and work for those 'unexpected' things that seem to come up in new development.
    Unfortunately most of those unexpected things come up because the developer did not adequately define all of the requirements. The code may execute when those things arise but it likely won't do the right thing.
    Seeing all three of those red flag issues in the same question is like waving a red flag at a charging bull. The responses you get are all likely to be of the 'DO NOT DO THAT' variety.
    You are correct that a work table is appropriate when there is business logic to be applied to a set of data that cannot be applied using SQL alone. Use a regular table unless
    1. you plan to have multiple sessions working with the table simutaneously,
    2. each session needs to work with ONLY their own data in that table and not data from other sessions
    3. the data does NOT need to be available after the session ends
    4. you actually need a GTT to take advantage of the automatic data preservation (ON COMMIT PRESERVE/DELETE) functionality
    Remember - when a session ends the data in the GTT is gone. That can makek it very difficult to troubleshoot data related problems since a different session can't see what data is in the table. Even if a GTT is needed for the final product it is very useful to use a regular table so that the data can be examined after test runs to help find and fix problems. Then after development is complete and initial testing is done a GTT would be substituted and final testing performed.
    So the main remaining question is why you need to perform multiple dynamic queries to get the data populated into the work table? Especially why is a nested cursor loop needed? My suspicion is that you have the queries stored in a query table and one of your loops extracts the query and executes it dynamically.
    How many queries are we talking about? Do these queries change from run to run? Please provide more detail of the process and an example query for the selection filtering as well as a typical dynamic query you plan to use.

  • How to create an ADF table which has a command button column?

    Hi
    Thank you for reading my post
    how i can create a tabl that one of its column is a command button.
    when i press the command button it will , for example delete that row or do some action.
    indeed i want to know
    -how to have a command button column
    -how to find the rowID or some row identifier that help me locate that row in the database.
    thanks

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Rainer Wagner ([email protected]):
    Imagine a table T_Q with columns C_1, C_2, C_3 and UN_123.
    C_1, C_2 and C_3 are all numeric and given by the user.
    UN_123 has to be a calculated sequence number starting by 1 and incremented by 1 for each combination of C_1, C_2 and C_3, i.e., the sequence number depends on the key values C_1, C_2 and C_3.
    Could anybody provide a code sample on how to create a BEFORE INSERT trigger , which calculates the value of the column UN_123 based on the values of C_1, C_2 and C_3 ??
    Premise: Rather than using any sequence, the trigger code should only be based on the table T_Q<HR></BLOCKQUOTE>
    null

  • How to define an internal table which have to be dynamic

    Hallo,
    here's a problem that i have to solve (but how ?).
    I defined an internal Table with 2 columns:
    col1: tablename
    col2: fieldname
    This table is filled with an unknown number of datasets like this:
    dataset1: A001 KAPPL
    dataset2: A001 KNUMH
    dataset3: A903 KUNNR    and so on.
    I don't know which tablenames and fieldnames are contained.
    Now i have to read those fields (e.g. KAPPL) from those tables (e.g. A001) into an internal table.
    But i don't know how to define this internal table.
    Could anyone help me please ?
    Thanks a lot.
    Silvio

    Hi Wirth
    DATA:
    w_tabname TYPE w_tabname,
    w_dref TYPE REF TO data,
    table_name TYPE tadir-obj_name.
    FIELD-SYMBOLS: <t_itab> TYPE ANY TABLE.
    READ YOUR INTERNAL TABLE (DATA SET) AND GET THE TABLE NAME,
    AND PASS IT TO W_TABNAME.
      w_tabname = A001.
    CREATE DATA w_dref TYPE TABLE OF (w_tabname).
      ASSIGN w_dref->* TO <t_itab>.
      Now use <t_itab> as your internal table to fetch data .
      <t_itab> will have the structure of A001.
    SELECT *
            FROM (w_tabname) UP TO 10 ROWS
      INTO TABLE <t_itab>.
    Regards
    Hareesh Menon

  • How to get Tcode for table which has a table maintenance done

    Hi Friends,
    I have one issue.
    How to get the specific Tcode again for the table  to which i have used table maintenance .
    I have generated table maintenance for many tables inside my package.
    If i want specific Tcode for that particular table how do i find it...Is there any way to get that
    Thanks in advance.
    Regards
    kishore

    Hi Gautham,
    I am still having problem... If i give Z* it shows all the Tcodes created with Z.
    For that i will click Display object list and get my Tcodes inside my package..
    But that is not my issue...
    I am sorry if i didn get you properly
    But still i didn find any way for that.
    Will give one sample table which is Ztest. Ihave tcode ztest1.
    Now as u said if i give Z* i will get all Z* tcodes ..In TSTCP table if i execute iam getting only the Tcode fields
    lot of Z names(tcodes) are there. In that how will i find which is mine.I am not getting any parameter fied in output and all..
    please help me.
    Regards
    kishore

  • How to instantiate multiple large tables while DB is online

    Hello Experts,
    I've set up goldengate on a RHEL 11.2.0.3 Cluster to a HP Unix Itanium 10.2.0.4 database.
    I've got a sample table replicated successfully, and changes are moving over to the target system.
    However, now comes the real thing, I have about 100 + varying size tables, one 1TB, then a few 30 GB tables, and then finally a bunch of smaller tables.
    I've not been able to find a clean way to do this while the db is online.
    The afterscn is good, but it works for the replicat not at the table level...
    Any help is appreciated.
    Best Regards.

    Since I've received no updates here, I'd put in an SR with Oracle Support.
    The suggestion was to add additional large tables online using another new replicat, with the afterscn option for the replicat.
    Once the changes are all synced up and the replication has been running for a while, stop the Pump on the source, stop the new replicat, delete it, and move the table configuration to an existing replicat, and startup the stopped pump, and you're done with the online re-instantiation.
    Am putting it to the test, but logically it sounds feasible.

  • How can i find the tables which dont contain any data under my database ?

    Can you please suggest me a way to find the tables which dont contain any data under my database ?
    Regards,
    Renu

    Can you please suggest me a way to find the tables which dont contain any data under my database ?
    For the schema that you've logged in to, you could do something like this:
    test@XE>
    test@XE> @test
    test@XE> --
    test@XE> set serveroutput on size 1000000
    test@XE>
    test@XE> declare
      2    n_count  number;
      3  begin
      4    for rec in (select object_name from user_objects
      5                where object_type = 'TABLE')
      6    loop
      7      execute immediate 'select count(*) from '||rec.object_name
      8      into n_count;
      9      if (n_count = 0) then
    10        dbms_output.put_line(rec.object_name);
    11      end if;
    12    end loop;
    13  end;
    14  /
    BONUS
    RUN_STATS
    PL/SQL procedure successfully completed.
    test@XE>
    test@XE>For the other schemas, you could query from dba_objects and probably display the owner as well.
    HTH
    isotope

  • How can i create a table which name is dynamic and not static?

    i have a question to ask. normaly if i want to create a table, i must provid a name for the table. for example, create table tt (id number(5)). But now in my application, I need to control the table name with params through function, how can i do?
    thx

    First thank you to reply so fast!
    But I met problem according to your instructive. The following is my code:
    declare
    m varchar(5);
    begin
    m:='hello';
    execute immediate 'create table'|| m ||'(id number(5),name varchar(5))';
    commit;
    end;
    The SQL*Plus tell me the command create is invalid. My oracle is 8.1.7.0.0. Maybe I miss something so that I can not get correct result. Wish your further help.
    yours sincerely
    zhou jinguang

  • How to select from multiple tables which reside on different data stores ?

    Suppose I have two data stores in one TimesTen instance:
    1) Datastore A:
    table1
    2) Datastore B:
    table2
    I want to make a query like this:
    select ... from table1, table2 where table1.colA = table2.colB
    Can I ? If not, is there a workaround ?
    BTW, because of business, we have to use two or more different datastores, so we can not put table1/table2 in the same datastore.
    Thanks very much.

    You can query multiple TimesTen databases, but your original question was about joining tables from two databases, which is not supported.
    Using Cache Connect to Oracle to query an Oracle database is not distributed. It's still one single Oracle database you are querying. You cannot join a table in the TimesTen database with a table in the Oracle database, this is not allowed.
    If you are willing to share your business requiremens, we can take a look and see what solution might work for you. Would you like to discuss this offline?
    Susan

  • How to report on a table which is  in BW Side - Urgent

    Hi,
    We have requirement to create reports on the table tcurr which is present in BW Side.
    Is there any way to report on it.
    Thanks,
    Arvind

    Many ways - you can create ABAP queries (if it is one single table you can actually do with SE16 itself), or if you want to run a bex query, you can create a datasource in this table and create a virtual cube on top of that DS and create Bex queries.
    There might be standard txns (check SPRO--General settings -- Exchange rate ; and other currency related txns ) which may work for you.

  • How to handle  a large table using a JTable

    I want to create a lookup for the customer master file. And there is over 5000 records. so, what is the way to handle this case?
    ( if adding the all elements to vector or array, i think it is very time consuming and request many memory)
    thank you.

    Hi, I had similar problem - I had a table with about 100000 records - I was receiving java heap error when I was trying to load it. I have solved the task by loading data by portions - only when they are needed. Make a buffer (eg 200 records) of loaded data. Initially load first 200 records to it. Implements TableModel.getValueAt(row, col) in the way that if the row index is in currently loaded records range, return existing value. If it is out of range, replace data in buffer with data range containing requested value. For example, if row=50, take 50th row from loaded buffer; if row=450, first load records from 400th to 600th to your buffer, than take 50th value from it. Works perferct (table is scrlled with no problems) for 100000 records, mo memory overloading.
    The real problem appeared, when I had to sort this table - takes really long time.
    p.s. 5000 records is not too much - you can load all of them in one array and have no problems.

  • How to fill depended Z-Table, created by Rapid Application Tool, with initial data?

    Hello gurus,
    I created a component ZBOOKING with RAD Tool and will fill booking detail table with initial data during a creation of new booking objekt.
    My Booking component looks like on the picture below. It was created with Rapid Application Tool and is based on one ZBOOKING Table with was created in CRM Backend and one “Booking details” Table with was created with Rapid Application.
    My Question is how should I populate initial Template-Data to this dependent “booking details” Table wenn I will create a new booking object.
    Web UI of ZBooking component
    Component structure of ZBooking
    I have tried to do sample implementation in do_init_context method of ZACL_CLASS00000C_IMPL class to fill ZBOOKING_DETAILS with some data.
    method DO_INIT_CONTEXT.
    CALL METHOD SUPER->DO_INIT_CONTEXT.
    DATA: lr_col TYPE REF TO if_bol_bo_col,
    lr_valuenode TYPE REF TO  cl_bsp_wd_value_node,
    lr_template  TYPE REF TO  ZBOOKING_DETAIL.
    CREATE DATA lr_template.
    CREATE OBJECT lr_valuenode
    EXPORTING
    IV_DATA_REF = lr_template.
    if lr_valuenode is BOUND.
    lr_valuenode->SET_PROPERTY_AS_STRING(
    iv_attr_name = 'ZZVISITDATE' "#EC NOTEXT
    iv_value     = '01.01.2014'
    ENDIF.
    CREATE OBJECT lr_col TYPE cl_crm_bol_bo_col.
    lr_col->ADD(
    exporting
    iv_entity = lr_entity
    IV_SET_FOCUS = ABAP_TRUE
    me->TYPED_CONTEXT->ZBOOKING_DETAIL->SET_COLLECTION( lr_col ).
    endmethod.
    After this implementation the initial data is displayed in “Booking details”.
    However if I press an Edit-List-button (Assignment block) I get an error “CUST Operation”.
    May be I should fill this depented table ZBOOKING_DETAILS without cl_bsp_wd_value_node?
    Where should I implement logic if I want to fill initial data just during creation of booking object and not every
    time when the booking object is called or initialized?
    Regards Dmitry

    Hi,
    I get an error "Dereferencing of the NULL reference" during created_related_entity.
    If you see on the picture below I think that I use right relation name for my zbooking_detail table.
    method DO_INIT_CONTEXT.
    CALL METHOD SUPER->DO_INIT_CONTEXT.
    data :   lr_leading_entity  TYPE REF TO cl_crm_bol_entity,
                lr_col TYPE REF TO if_bol_bo_col.
               lr_leading_entity->create_related_entity(
                      iv_relation_name = 'ZAET_CA_ATAB000000' ).
               lr_leading_entity->SET_PROPERTY_AS_STRING(
                           iv_attr_name = 'ZZVISITDATE' "#EC NOTEXT
                           iv_value     = '01.01.2014'
    lr_col->ADD(
       exporting
         iv_entity = lr_leading_entity
         IV_SET_FOCUS = ABAP_TRUE
    me->TYPED_CONTEXT->ZBOOKING_DETAIL->SET_COLLECTION( lr_col ).
    endmethod.
    Many Thanks & Regards,
    Dmitry

Maybe you are looking for

  • Flash Builder 4.7 is breaking my buttons

    Hi, I have a project that works fine in 4.6, but in 4.7 all the buttons in my swc are swapped. What I mean is that the art for the buttons is randomly changed for other art in the swc. Is this a bug? Is there a fix? Cheers.

  • Add old/existing mobileme galleries to Aperture?

    I have created mobileme galleries with iPhone and iPhoto on another computer, and would now like to be able to manage them on Aperture 3. Is this possible? I have imported the old iPhoto library, but none of the mobileme galleries imported. I have al

  • Stereo Line-in for an iPad

    Has anyone been able to find a lightning cable, breakout box, or dock that allows for stereo recording into an iPad/iPhone?  There are several stereo mics on the market that plug directly into the lightning port so I know it is possible to send the s

  • Empty pcap file with Embedded Packet Capture

    Hello, I have configured the EPC in my CISCO 2901 CUBE for monitoring VOIP traffic. #First I configure the type of traffic I want to filter access-list 110 permit tcp any any eq 5060 access-list 110 permit tcp any any eq 5061 access-list 110 permit u

  • JTable Blank Rows When INSERT/DELETE in other panel with same ViewObject

    Hi, Jdev 10.1.2 JClient 2 panels based on same ViewObject in same AM One panel with Grid UI => JTable Other panel with Form UI When I insert or delete a record in the panel with Form UI and return to the panel with JTable blank rows are displayed. Th