Partitioning oracle table on varchar2 field

hi all,
i would like to know if one can create table partitions based on varchar2 data type. if possible please tell me which type of partition is best suited and also whether the same can be done in oracle version 8i.
thanks in advance
thomaskparkash

thomas k wrote:
hi all,
i would like to know if one can create table partitions based on varchar2 data typeYes. See example in http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/partiti.htm#sthref2596.
thomas k wrote:
if possible please tell me which type of partition is best suited.There is no single answer for a such a broad question. It depends on your data model and the queries you intend to run.
Please read general recommandations about partition types in Admin. Guide:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/partiti.htm#i1006194

Similar Messages

  • Need help for SQL SELECT query to fetch XML records from Oracle tables having CLOB field

    Hello,
    I have a scenario wherein i need to fetch records from several oracle tables having CLOB fields(which is holding XML) and then merge them logically to form a hierarchy XML. All these tables are related with PK-FK relationship. This XML hierarchy is having 'OP' as top-most root node and ‘DE’ as it’s bottom-most node with One-To-Many relationship. Hence, Each OP can have multiple GM, Each GM can have multiple DM and so on.
    Table structures are mentioned below:
    OP:
    Name                             Null                    Type        
    OP_NBR                    NOT NULL      NUMBER(4)    (Primary Key)
    OP_DESC                                        VARCHAR2(50)
    OP_PAYLOD_XML                           CLOB       
    GM:
    Name                          Null                   Type        
    GM_NBR                  NOT NULL       NUMBER(4)    (Primary Key)
    GM_DESC                                       VARCHAR2(40)
    OP_NBR               NOT NULL          NUMBER(4)    (Foreign Key)
    GM_PAYLOD_XML                          CLOB   
    DM:
    Name                          Null                    Type        
    DM_NBR                  NOT NULL         NUMBER(4)    (Primary Key)
    DM_DESC                                         VARCHAR2(40)
    GM_NBR                  NOT NULL         NUMBER(4)    (Foreign Key)
    DM_PAYLOD_XML                            CLOB       
    DE:
    Name                          Null                    Type        
    DE_NBR                     NOT NULL           NUMBER(4)    (Primary Key)
    DE_DESC                   NOT NULL           VARCHAR2(40)
    DM_NBR                    NOT NULL           NUMBER(4)    (Foreign Key)
    DE_PAYLOD_XML                                CLOB    
    +++++++++++++++++++++++++++++++++++++++++++++++++++++
    SELECT
    j.op_nbr||'||'||j.op_desc||'||'||j.op_paylod_xml AS op_paylod_xml,
    i.gm_nbr||'||'||i.gm_desc||'||'||i.gm_paylod_xml AS gm_paylod_xml,
    h.dm_nbr||'||'||h.dm_desc||'||'||h.dm_paylod_xml AS dm_paylod_xml,
    g.de_nbr||'||'||g.de_desc||'||'||g.de_paylod_xml AS de_paylod_xml,
    FROM
    DE g, DM h, GM i, OP j
    WHERE
    h.dm_nbr = g.dm_nbr(+) and
    i.gm_nbr = h.gm_nbr(+) and
    j.op_nbr = i.op_nbr(+)
    +++++++++++++++++++++++++++++++++++++++++++++++++++++
    I am using above SQL select statement for fetching the XML records and this gives me all related xmls for each entity in a single record(OP, GM, DM. DE). Output of this SQL query is as below:
    Current O/P:
    <resultSet>
         <Record1>
              <OP_PAYLOD_XML1>
              <GM_PAYLOD_XML1>
              <DM_PAYLOD_XML1>
              <DE_PAYLOD_XML1>
         </Record1>
         <Record2>
              <OP_PAYLOD_XML2>
              <GM_PAYLOD_XML2>
              <DM_PAYLOD_XML2>
              <DE_PAYLOD_XML2>
         </Record2>
         <RecordN>
              <OP_PAYLOD_XMLN>
              <GM_PAYLOD_XMLN>
              <DM_PAYLOD_XMLN>
              <DE_PAYLOD_XMLN>
         </RecordN>
    </resultSet>
    Now i want to change my SQL query so that i get following output structure:
    <resultSet>
         <Record>
              <OP_PAYLOD_XML1>
              <GM_PAYLOD_XML1>
              <GM_PAYLOD_XML2> .......
              <GM_PAYLOD_XMLN>
              <DM_PAYLOD_XML1>
              <DM_PAYLOD_XML2> .......
              <DM_PAYLOD_XMLN>
              <DE_PAYLOD_XML1>
              <DE_PAYLOD_XML2> .......
              <DE_PAYLOD_XMLN>
         </Record>
         <Record>
              <OP_PAYLOD_XML2>
              <GM_PAYLOD_XML1'>
              <GM_PAYLOD_XML2'> .......
              <GM_PAYLOD_XMLN'>
              <DM_PAYLOD_XML1'>
              <DM_PAYLOD_XML2'> .......
              <DM_PAYLOD_XMLN'>
              <DE_PAYLOD_XML1'>
              <DE_PAYLOD_XML2'> .......
              <DE_PAYLOD_XMLN'>
         </Record>
    <resultSet>
    Appreciate your help in this regard!

    Hi,
    A few questions :
    How's your first query supposed to give you an XML output like you show ?
    Is there something you're not telling us?
    What's the content of, for example, <OP_PAYLOD_XML1> ?
    I don't think it's a good idea to embed the node level in the tag name, it would make much sense to expose that as an attribute.
    What's the db version BTW?

  • Mainframe data loaded into Oracle tables - Test for low values using PL/SQL

    Mainframe legacy data has been copied straight from the legacy tables into mirrored tables in Oracle. Some columns from the mainframe data had 'low values' in them. These columns were defined on the Oracle tables as varchar2 types. In looking at the data, some of these columns appear to have data that looks like little square boxes, not sure but maybe that is the way Oracle interprets the 'low values' in the original data into varchar. When I run a select to find all rows where this column is not null, it selects these columns. In the results of the select statement, the columns appear to be blank, however, in looking at the data in the column using SQL Developer, I can see the odd 'square boxes'. My guess is that the select statement is detecting that something exists in this column. Long story short, some how I am going to have to test this legacy data on the Oracle table using Pl/Sql to test for 'low values'. Does anyone have any suggestions on how I could do this????? Help! The mainframe data we are loading into these tables is loaded with columns with low values.
    I am using Oracle 11i.
    Thanks
    Edited by: ncsthbell on Nov 2, 2009 8:38 AM

    ncsthbell wrote:
    Mainframe legacy data has been copied straight from the legacy tables into mirrored tables in Oracle. Not a wise thing to do. Mainframe operating systems typically use EBCDIC and Unix and Windows servers use ASCII. The endian is also different (big endian vs little endian).
    Does anyone have any suggestions on how I could do this????? As suggested, use the SQL function called DUMP() to see the actual contents (in hex) of these columns.

  • Updating an oracle table with data from an xml string

    Hi - I need help with the following problem:
    We have a table in the database with a field of xml type. We are going to take each string that gets inserted into the xml type field in the 'xml table' and parse the data into another oracle table with corresponding fields for every element.
    once the record gets inserted into the 'real table' the user might want to update this record they will then insert another record into the 'xml table' indicating an update(with a flag) and then we need to update the 'real table' with the updated values that have been sent in.
    The problem that I am having is that I do not know how to create this update statement that will tell me which fields of the table need to be updated.(only the fields that need to be updated will be in the xml string in the 'xml table').
    Please help me with this - ASAP!

    Are you wanting to upload the file through an Oracle Form or just upload a file? If it isn't via forms, then you should probably post your question here: {forum:id=732}
    You also should post the version of Forms, Database, etc...
    As far as uploading files via a text file, I personally like to use Oracle External Tables even in Forms. You can Google that and there is plenty of information. If you search this forum, then you will see lots of people use UTL_FILE in forms, but you can Google that also for more information.

  • Read xml into oracle table

    Hi,
    How can I read an xml.file read in an oracle table (invoice varchar2(20), invoice_line number, ship_date date, country varchar2(100))?
    The xml looks like this:
    <?xml version="1.0" encoding="utf-8" ?>
    - <dataset xmlns="http://developer.cognos.com/schemas/xmldata/1/" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
    - <!--
    <dataset
    xmlns="http://developer.cognos.com/schemas/xmldata/1/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
    xs:schemaLocation="http://developer.cognos.com/schemas/xmldata/1/ xmldata.xsd"
    >
    -->
    - <metadata>
    <item name="Invoice #" type="xs:string" length="42" />
    <item name="Invoice Line" type="xs:string" length="10" />
    <item name="Ship Date" type="xs:date" />
    <item name="COUNTRY" type="xs:string" length="8" />
    </metadata>
    - <data>
    - <row>
    <value>26623</value>
    <value>0001</value>
    <value>2010-05-03</value>
    <value>USA</value>
    </row>
    - <row>
    <value>26624</value>
    <value>0001</value>
    <value>2010-05-03</value>
    <value>USA</value>
    </row>
    - <row>
    <value>26624</value>
    <value>0003</value>
    <value>2010-05-03</value>
    <value>USA</value>
    </row>
    - <row>
    <value>26625</value>
    <value>0001</value>
    <value>2010-05-03</value>
    <value>USA</value>
    </row>
    </data>
    </dataset>
    Thnx, Robbert

    Hi,
    Possible solutions will depend on your db version, which you didn't give.
    The following example assumes you're using 10gR2 :
    CREATE TABLE invoices (
    invoice varchar2(20),
    invoice_line number,
    ship_date date,
    country varchar2(100)
    DECLARE
    xmldoc xmltype := xmltype(
    '<?xml version="1.0" encoding="utf-8" ?>
    <dataset xmlns="http://developer.cognos.com/schemas/xmldata/1/" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
    <metadata>
    <item name="Invoice #" type="xs:string" length="42" />
    <item name="Invoice Line" type="xs:string" length="10" />
    <item name="Ship Date" type="xs:date" />
    <item name="COUNTRY" type="xs:string" length="8" />
    </metadata>
    <data>
    <row>
    <value>26623</value>
    <value>0001</value>
    <value>2010-05-03</value>
    <value>USA</value>
    </row>
    <row>
    <value>26624</value>
    <value>0001</value>
    <value>2010-05-03</value>
    <value>USA</value>
    </row>
    <row>
    <value>26624</value>
    <value>0003</value>
    <value>2010-05-03</value>
    <value>USA</value>
    </row>
    <row>
    <value>26625</value>
    <value>0001</value>
    <value>2010-05-03</value>
    <value>USA</value>
    </row>
    </data>
    </dataset>'
    BEGIN
      INSERT INTO invoices (invoice, invoice_line, ship_date, country)
      SELECT invoice, invoice_line, to_date(ship_date, 'YYYY-MM-DD'), country
      FROM XMLTable(
       XMLNamespaces(default 'http://developer.cognos.com/schemas/xmldata/1/'),
       '/dataset/data/row'
       passing xmldoc
       columns
         invoice      varchar2(20)  path 'value[1]',
         invoice_line number        path 'value[2]',
         ship_date    varchar2(10)  path 'value[3]',
         country      varchar2(100) path 'value[4]'
    END;
    /If your XML document resides outside the database, you may also access it directly through a DIRECTORY object :
    CREATE OR REPLACE DIRECTORY xmldir AS 'C:\oracle\invoices\xml';
    INSERT INTO invoices (invoice, invoice_line, ship_date, country)
    SELECT invoice, invoice_line, to_date(ship_date, 'YYYY-MM-DD'), country
    FROM XMLTable(
    XMLNamespaces(default 'http://developer.cognos.com/schemas/xmldata/1/'),
    '/dataset/data/row'
    passing xmltype( bfilename('XMLDIR', 'invoices.xml'), nls_charset_id('AL32UTF8') )
    columns
       invoice      varchar2(20)  path 'value[1]',
       invoice_line number        path 'value[2]',
       ship_date    varchar2(10)  path 'value[3]',
       country      varchar2(100) path 'value[4]'
    );Some docs about XMLTable and XML querying with Oracle :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb_xquery.htm#ADXDB1700
    Edited by: odie_63 on 24 juin 2010 20:07

  • What Oracle Table contains Partition Key Field Name?

    What Oracle table/view maintains the partition key field name?
    All_Tab_Partitions does not appear to maintain such information.
    When I use Toad -> Schema -> Tables -> Partitions, it lists the partition key field name that the partition is based.
    Thank You

    all_part_key_columns
    or
    USER_part_key_columns
    Edited by: OrionNet on Dec 5, 2008 3:56 PM

  • Partitioning of table in oracle 10g - How to Add

    Hello Friends ,
    Hope you are all fine and doing great.
    By the way - I have a quick question on oracle 10g Partitioning of tables...
    I have a table with partition as stated below ..
    CREATE TABLE X_ACC_ASSETS_GPC_AGG
    X_ACC_ASSETS_GPC_AGG_RK NUMBER(10) NOT NULL,
    X_AS_OF_DT DATE NOT NULL,
    ACCOUNT_RK NUMBER(10) NOT NULL,
    X_UNIV_ACCOUNT_ID NUMBER(10),
    ACCOUNT_ID VARCHAR2(10 BYTE),
    X_ASSET_TYPE_CD VARCHAR2(6 BYTE),
    X_AUC_AMT NUMBER(18,5),
    X_FIRM_AMT NUMBER(18,5),
    X_ADJ_SRCE_AMT NUMBER(18,5),
    PROCESSED_DTTM DATE
    )PARTITION BY RANGE (X_AS_OF_DT)
    PARTITION P200712 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION P201112
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    PARTITION PMAX
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    )NOPARALLEL;
    My question is :
    1) How to add a partition say P201201 ..
    Since I have already stated PARTITION PMAX can I still add partition?
    2) Can I add partition even though the table has data ?
    ==========================
    I tried to add partition ..say
    ALTER TABLE X_ACC ADD PARTITION P201201 VALUES LESS THAN
    (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    NOLOGGING
    NOCOMPRESS
    TABLESPACE KAW_DATA
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUFFER_POOL DEFAULT
    but getting the error ..
    "partition bound must collate higher than that of the last partition"
    Thanks/kumar

    You have partitions
    200712
    200812
    200912
    201012
    201112
    PMAX.
    so your condition for partition p201112 is '201012-01-01' to '201112-01-01' i.e the values between these two dates will be in partition p201112. and then everything else will be in PMAX. So now you are splitting your pmax.
    alter table X_acc split partition pmax at ( to_date('2012-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') )
    into (partition p201201, partition pmax); The condition you have to change. I just showed as an example. It could be the date range between two dates or it could be greater than a date value. It is upto how you want this new partition.
    how to add partition between two partition
    Edited by: pransuj on Mar 25, 2011 11:13 AM
    Edited by: pransuj on Mar 25, 2011 11:14 AM

  • Use of Logical Partition in a Oracle Table...

    What is the use of Logical Partition in a Oracle Table as Target.  Techincal Manual does not say any significance.
    My question is:
    If the Table has no partitions and if we add Logical Partitions using Data Service, what purpose will it serve?
    We are planning to load 30 Million records a day into a Oracle Table. As of now the Target table has no partition and we are planning to have that soon. Is there a better way to load the data into Target Table, using Partition, Bulk Loading(API), Degree of Parallelism, etc., We have not dealt data of that volume, inputs are highly appreciated.
    Regards.
    Santosh.

    Initial Value:
    Indicator that NOT NULL is forced for this field
    Use
    Select this flag if a field to be inserted in the database is to be filled with initial values. The initial value used depends on the data type of the field.
    Please note that fields in the database for which the this flag is not set can also be filled with initial values.
    When you create a table, all fields of the table can be defined as NOT NULL and filled with an initial value. The same applies when converting the table. Only when new fields are added or inserted, are these filled with initial values. An exception is key fields. These are always filled automatically with initial values.
    Restrictions and notes:
    The initial value cannot be set for fields of data types LCHR, LRAW, and RAW. If the field length is greater than 32, the initial flag cannot be set for fields of data type NUMC.
    If a new field is inserted in the table and the initial flag is set, the complete table is scanned on activation and an UPDATE is made to the new field. This can be very time-consuming.
    If the initial flag is set for an included structure, this means that the attributes from the structure are transferred. That is, exactly those fields which are marked as initial in the definition have this attribute in the table as well.
    hope it helps,
    Saipriya

  • Fields missing in Oracles tables created by Infospokes

    Hi S.A.P Gurus!
    My problem is as follows:
    We have created Infopokes with Oracle table as destination.
    Even though, the transport to other systems is correct, and the infospoke have all the fields, when we execute it, some fields are missing in the destination (oracle table), and they should appear.
    Does anyone know what we could do to avoid this problem?
    Thanks in advance!
    Kind regards.

    Hi Raul,
    Was just going through your thread ..and found that you were able to transfer the data to the oracle table.
    I am aslo working on infospoke where I have to transfer the data from my Infoobject to a table in Oracle.
    For that i have created a infospoke and executed it to get the data in the another tabel in sap.
    The problem is that  I dnt know how to move the data from this table in SAP to oracle table . Did u used any interface for this or any kind of ABAP programming that you have done.
    Please suggest how this can be implemented.
    I have open up a thread for this InfoSpokes InfoSpokes
    Reward Points will be awarded.
    Best Regards
    Ankit Bhandari

  • How to extract data from Oracle Table to an Oracle XMLtype field

    All,
    I'm very new with ODI and I'm looking for a way to implement the following scenario:
    I have the Oracle table A, already mapped to Data Model A. This table has the following fields:
    field X (PK)
    field Y
    field Z
    field W
    I have a table B, already mapped to Data Model B. This table has the following fields:
    field X (PK)
    field V (XMLType)
    I want to extract the data from Table A to a XML file with the following structure:
    <X> yada yada yada </X>
    <Y> yada yada yada </Y>
    <Z> yada yada yada </Z>
    <W> yada yada yada </W>
    and then insert this file into the field V of Table B. How can I do that?
    TIA,
    Rodrigo

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • Remove carriage returns from a field in an oracle table

    I have a field that is defined as a LONG in my oracle table; the data contained in this field has carriage returns/line feeds (it's free form text); as i'm selecting data from this field, i need the carriage returns removed so that the data from this field all appears on one line.
    I tried using the TRANSLATE function to convert the carriage returns to something else, but that doesn't work.
    Example:
    Select comment from Notes:
    COMMENT
    the applicant called for an appointment;
    an exam was scheduled for 4/1/05 at 9am;
    called applicant to confirm app
    this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled for 4/1/05 at 9am; called applicant to confirm app"
    How can i do this? Can the decode function be used to remove the carriage returns in this field?

    when i used translate its giving correctly,
    SQL> ed
    Wrote file afiedt.buf
    1 select translate('the applicant called for an appointment;
    2 an exam was scheduled for 4/1/05 at 9am;
    3 called applicant to confirm app
    4 this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled
    5 How can i do this? Can the decode function be used to remove the carriage returns in this field
    6* ',' ') from dual
    SQL> /
    TRANSLATE('THEAPPLICANTCALLEDFORANAPPOINTMENT;ANEXAMWASSCHEDULEDFOR4/1/05AT9AM;CALLEDAPPLICANTTOCONF
    the applicant called for an appointment; an exam was scheduled for 4/1/05 at 9am; called applicant t
    SQL> ed
    Wrote file afiedt.buf
    1 select 'the applicant called for an appointment;
    2 an exam was scheduled for 4/1/05 at 9am;
    3 called applicant to confirm app
    4 this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled
    5* How can i do this? Can the decode function be used to remove the carriage returns in this field
    SQL> /
    'THEAPPLICANTCALLEDFORANAPPOINTMENT;ANEXAMWASSCHEDULEDFOR4/1/05AT9AM;CALLEDAPPLICANTTOCONFIRMAPPTHIS
    the applicant called for an appointment;
    an exam was scheduled for 4/1/05 at 9am;
    called applicant to confirm app
    this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled for 4
    How can i do this? Can the decode function be used to remove the carriage returns in this field?
    SQL>

  • I want to update date field in oracle table using database adaptor

    Hi Guys,
    I want to update date in oracle table field which is 'DATE' type , but i am getting following error.
    Pure SQL Exception.
    Pure SQL Execute of update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=? where CTRL_ID=? failed. Caused by java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    </summary>
    </part>
    - <part name="detail">
    <detail>
    ORA-01830: date format picture ends before converting entire input string
    </detail>
    i am formated the date using following code and assigned to one variable.
    ora:formatDate(ora:getCurrentDateTime(),'dd-MMM-yyyy hh:mm:ss ')
    this is update query
    update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=#date where CTRL_ID=#id
    Please provide solution.
    regards
    janardhan

    The thing is that XSLT often doesn't deliver the functionality required when it comes to times.
    You suggest appening "Z" to the time but this means that the time is now in UTC time. What if the system from where the date is being converted is running in NZ using local time? Other systems that recieve the date (and correctly handle the time zone) will now have a time that is out by a number of hours.
    You often can't ignore the time zone (drop the 'Z') as if you send the time to a system it has to either assume the time is local to it (which may not be the case... the other system coudl be in a different time zone) or assume the time is UTC (I think crossfire does this by default).
    Typically can't just append a time zone (e.g. +11:00) either as many places have daylight savings so the value to appended is variable (you then need some way of determining what the value is... either Java Embedding or a Service).
    As you mention it does depend on the use case but in many circumstances using Jaba Embedding, not as suggested above but with the appropriate Java.util.Calendar classes, is the best way to handle date and time in BPEL. Even still you need to ascertain the format of times external to the system and ensure you parse them correctly.
    ANd even if you do all this you can still run into problems. I've seen a real world example where two systems which both handled time zones correctly and had previously been working together for quite a while, satrted reporting different times. It turns out that only one of them had had the most recent Java Time Zone patches applied and there had been a change in the dates for daylight savings here (Australia). Be warned!

  • Partitioning on a table on the field TIMESTAMP WITH TIME ZONE

    Hi I have a very large size table which has grown to a size that we are not able to query it efficiently. We have decided to partition the table. But the issue is the table has a TIMESTAMP WITH TIME ZONE field and not DATE. I have found some links on the web which state this might cause an error. I am planning to create a temp table with the partition rules and at the same time copy data from the original one.
    using CREATE TABLE XYZ PARTITION BY RANGE (ABC) ( ---- Partition rules ------) NOLOGGING AS SELECT * FROM XYZ_ACTUAL where 1 = 2;
    Then if it works fine, I would rename the table with partitions to the actual name.
    Should all this be fine?
    The database is very critical. Hence the dilemma.

    Have you tried converting the timestamp with time zone to a character string as a partition key, possibly using an edit mask to control the timestamp components used?
    Your plan sounds OK to me - if you can get the partitioned table created - but I would test in a development first o see where the lLw of Unintended Consequences might decide to manifest itself.
    Edited by: riedelme on Dec 8, 2009 9:13 AM

  • How to choose the partition in oracle tables?

    Dear all,
    i m in need to create the partitions on prod.db tables since i m not aware of creating partitions?i just go through some theroy concepts and understood the range and list partitions (i.e)Range is normally used for values less than like jan,feb,march or values less than 50,000 values less than 1,00,000 like that each partition is having separate tablespaces to increase the performance. and for list is used to denoting the directions like west,east,north,south like that.
    Now what i want to know is ?
    1.)when will i can go ahead with partitions?
    2.)before creating partitions is it advise to create index or not needed?
    3.)if i started to create partition what is the leading column have to create partition and which partition has to choose?
    pls let me know and pardon me if i did any mistakes.
    thanks in advance..

    I had to research on same topic. One of my teammates suggested few points that might help you also.
    Advantages of partitioning:
    1) Partitioning enables data management operations such data loads, index creation and rebuilding, and backup/recovery at the partition level, rather than on the entire table. This results in significantly reduced times for these operations.
    2) Partitioning improves query performance. In some cases, the results of a query can be achieved by accessing a subset of partitions, rather than the entire table. Parallel queries/DML and Partition-wise Joins are also got benefited much.
    3) Partitioning increases the availability of mission-critical databases if critical tables and indexes are divided into partitions to reduce the maintenance windows, recovery times, and impact of failures. (Each partition can have separate physical attributes such as pctfree, pctused, and tablespaces.)
    Partitioning can be implemented without requiring any modifications to your applications. For example, you could convert a nonpartitioned table to a partitioned table without needing to modify any of the SELECT statements or DML statements which access that table. You do not need to rewrite your application code to take advantage of partitioning.
    Disadvantages of partitioning:-
    1) Advantages of partition nullified when you use bind variables.
    Additional administration tasks to manage partitions viz. If situation arises for rebuilding of index then rebuilding should to be done for each individual partition.
    2) Need more space to implement partitioning objects.
    3) More time for some tasks, such as create non-partitioning indexes, collection of “global" statistics (dbms_stat’s granularity parameter to be set to GLOBAL. if sub partition are used then we have to set it to ALL).
    4) Partition would implies a modification (of explain plan) for ALL the queries against the partitioned tables. So, if some queries use the choosing partition key and may greatly improve, some other queries not use the partition key and are dramatically bad impact by the partitioning.
    5) To get the full advantage of partitioning (partition pruning, partition-wise joins, and so on), you must use the Cost Based Optimizer (CBO). If you use the RBO, and a table in the query is partitioned, Oracle kicks in the CBO while optimizing it. But because the statistics are not present, the CBO makes up the statistics, and this could lead to severely expensive optimization plans and extremely poor performance.
    Message was edited by:
    Abou

  • Introduction of Oracle Table Partitions into PeopleSoft HRMS environment

    I would like to pose a general question and see if anyone has found any published advice / suggestions from PeopleSoft or Oracle on this. I believe that Oracle table partitioning isn't supported through the PeopleTools application designer functionality. Most likely this is done for platform independence. However, we were thinking about implementing table partitioning for performance and the ability to refresh test instances with subsets worth of data instead of the entire database.
    I know that this would be a substantial effort, but was wondering if anyone had any documentation on this type of implemention. I've read some articles from David Kurtz on the subject, and it sounds like these were all custom jobs for each individual client. Was looking for something more generic on this practice from PeopleSoft or Oracle...
    Regards,
    Jay

    Thanks for the article Nicolas. I will add that to my collection, good reference piece.
    I think you gasped the gist of the query, which was I know that putting partitioning into a PeopleSoft application is going to be highly specific to the client and application that you are running. But what I looking for was something like a baseline guide for implementing partitioning in a PeopleSoft application as a whole.
    In other words, something like notifiaction that the application designer panels would be affected since they don't have the ability to manage partitions. Therefore, any changes to tables that would utilize partitioning would need to be maintained at the database level and no longer utilize the DDL generated from PeopleTools Application Designer. Other consideration would be, like maybe a list of tables that would be candidates for partitioning based on the application, in my case HRMS. And maybe, suggestions on what column should be used for partitioning, etc...All of which are touched on in your identified article about putting partitioning in at the database level for a generic application.
    Thanks for your help, it is much appreciated...
    Jay

Maybe you are looking for

  • SetUncaughtExceptionHandler() not working

    Hi there, using java 1.5... and using setDefaultUncaughtExcepion!handler() and setUncaughtExceptionHandler() to trap all uncaught exception in my (big) program. I'm observing that my 2 handlers are correctly called when a uncaught exception happens..

  • CD, DVD and ipod nano issues

    I just bought a new iPod nano- the first I have ever owned. I installed the iTunes software and that works okay. I plugged in the nano to the computer and the computer recognizes the nano, but iTunes does not. When I open iTunes, I get the following

  • Would Photoshop CS3 and Lightroom 3 work on  mavericks?

    I have had photoshop CS3 since I was a freshman and college (and haven't really seen a need to update) and use lightroom 3 wich a bought  two years ago. And wanted to know if I need to update them before downloading the FREE mavericks. Right now I am

  • Could not find file in Temp directory

    Hey all! I received the follwoing error when exporting a report into a pdf file using the ExportToStream method: Could not find file "C:\DOCUME1\CHL0337\ASPNET\LOCALS1\Temp\export_e269c3d0-e775-4351-b2ea-09507859a79a.tmp". I am using VS 2003 and CR 9

  • I want upgrade my iphone 4s into iphone 5 by using internet or chat

    i want to upgrade my new i phone 4s into i phone 5 i purchased on 24th august 2012