Partitioning by list
Which is the recommended way to partition by list:
a) Put each list partition on a separate tablespace
or
b) Put all the list partitions on the same tablespace?
What is the difference between the two?
Difference between the two is the fact that you're keeping data in separate datafiles using separate TS. Benefit of using separate TS for partition are
1. You can take one of the TS offline for backup. This is beneficial if the list is capable of bifurcating the history data. For example is records for 1997 are in TS xyz, then you can take xyz offline for backup without stopping the application.
2. If TS can be kept separately on different disk, then i/o benefit can be achieved.
Sudhanshu Bhandari
perotsystems TSI
Similar Messages
-
Partition by LIST and subpartition by LIST
Hi,
Can I create a table having partition by LIST and also subpartition by LIST.
If we can then please provide a syntax or otherwise if we can't then please provide a valid reason for it.
Regards,
KoushikYou can have list-list composite partitioning in 11G, not before that.
http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/partconc.htm#BCGJEEGJ
Search the documentation for the syntax. -
Partition by list (substr(col_name,1,4)) possible?
Hi,
Can we partition table by list based on function not just column?
partition by list (substr(column_name,1,4))
-Thanks
Regards,
Chan.Raj,
No. But email me for an alternative solution at [email protected]
Did you know something what we ignore and that you don't want to share here ?
Nicolas. -
HASH PARTITION TO LIST PARTITION
version : Oracle 10g
hi All,
i have a table partitioned by hash(8 segments) with 200 millions records . now we want to move to list partition the same table by state.
Is there a way to drop hash Partitions with out losing the data, and Add list partition.
No, you can't "convert" the Hash Partitions to List Partitions.
You have to create a new, empty, table that is List Partitioned and then move the data over to the new table.
You could use Direct Path Insert (i.e. INSERT with APPEND Hint) with PARALLEL degree and NOLOGGING on the target table to speed up the copy.
You could also use DBMS_REDEFINITION to migrate the data.
In either case, you also have to create the Indexes on the new table.
Hemant K Chitale -
Range - Interval Partition and List Subpartition.
Hi
I am trying to create the Range(Interval) Partition with List Sub partition (dynamically). Here the LOCATION_CD List is Dynamic. Basically Location_CD is Country name. e.g USA, IND,GER.....
Below Works good...
CREATE TABLE TEMP
SEQUENCE_ID NUMBER,
RESERVATION_DATE TIMESTAMP,
LOCATION_CD VARCHAR2(5)
PARTITION BY RANGE (RESERVATION_DATE)
INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
SUBPARTITION BY LIST(LOCATION_CD)
SUBPARTITION TEMPLATE
( SUBPARTITION CD_01 VALUES ('USA'),
SUBPARTITION CD_02 VALUES ('IND'),
SUBPARTITION CD_03 VALUES ('GER')
PARTITION TEMP values LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY'))
Today there are 3 Countries but going forward it can be more or less.
I like the Interval Range Partition concept, where the new partition is automatically gets added.
But at the same time can the new list sub partition be added ? If this doesn't work...can we have another alternative approach or partition technique ?
Please suggest.
Thanks
Jitesh R.Why didn't you just perform two inserts and answer the question yourself?
orabase> CREATE TABLE T (
2 SEQUENCE_ID NUMBER,
3 RESERVATION_DATE TIMESTAMP,
4 LOCATION_CD VARCHAR2(5))
5 PARTITION BY RANGE (RESERVATION_DATE)
6 INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
7 SUBPARTITION BY LIST(LOCATION_CD)
8 SUBPARTITION TEMPLATE (
9 SUBPARTITION CD_01 VALUES ('USA'),
10 SUBPARTITION CD_02 VALUES ('IND'),
11 SUBPARTITION CD_03 VALUES ('GER')) (
12 PARTITION root values LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY')));
Table created.
orabase> insert into t values (1, TO_DATE('02-JAN-2000'), 'USA');
1 row created.
orabase> select partition_name, subpartition_name
2 from user_tab_subpartitions
3 where table_name = 'T';
PARTITION_NAME SUBPARTITION_NAME
ROOT ROOT_CD_03
ROOT ROOT_CD_02
ROOT ROOT_CD_01
SYS_P84 SYS_SUBP83
SYS_P84 SYS_SUBP82
SYS_P84 SYS_SUBP81
6 rows selected.
orabase> insert into t values (1, TO_DATE('02-JAN-2000')+400, 'USA');
1 row created.
orabase> select partition_name, subpartition_name
2 from user_tab_subpartitions
3 where table_name = 'T';
PARTITION_NAME SUBPARTITION_NAME
SYS_P88 SYS_SUBP85
SYS_P88 SYS_SUBP86
SYS_P88 SYS_SUBP87
SYS_P84 SYS_SUBP81
SYS_P84 SYS_SUBP82
SYS_P84 SYS_SUBP83
ROOT ROOT_CD_01
ROOT ROOT_CD_02
ROOT ROOT_CD_03
9 rows selected. -
Any practical experience with composite partitioning range/list?
Hi,
I'm working on Oracle 9.2.0.4 and I plan to migrate several large range partitioned tables into range/list partitioned tables. I was wondering I anybody has some practical experience with this new feature (range/list composite partitioning) and if he encountered any bugs or "undocumented features" ?
Thanks for any feedback
Maurcie
PS: I'm not looking for any documentation about how to do it, I'm just wondering if anyone has some experience in a PRODUCTIVE environment.You can also put the query in a parameter file so you don't have to worry about escaping characters.
Dean -
Hash partitioning v. list partitioning on surrogate key + partition pruning
Hi,
Have a large fact table with surrogate keys, therefore queries are of form
select dimension.attribute..
from fact, dima, dimb..
where facta.dima_surrogate_key = dima.dimension_key
and facta.dimb_surrogate_key = dimb.dimension_key
and dima.attribute = <value>
and dimb.attribute = <value>
Would ideally like partition pruning to happen but will this happen if hash partition on facta.surrogate_key
Likewise could list partition on facta.dima_surrogate_key and further sub-partition on hash of factb.dima_surrogate_key.
Any advice much appreciated.user5716448 wrote:
Hi,
Version 11.2.0.1
fact table structure
PRODUCT_ID NUMBER
RETAILER_ID NUMBER
OUTLET_ID NUMBER
CALENDAR_ID NUMBER
BRANCH_ID NUMBER
PUBLISHER_ID NUMBER
DISTRIBUTOR_ID NUMBER
TRANS_TYPE_ID NUMBER
TRANS_QTY NUMBER (10)
TRANS_VALUE (10,4)
No date on fact table (just surrogate_id for calendar whihc links to calendar/date dimension.
Although queries can be by date of transaction, most aren't.
Potential to grow to 3 billion rows.
Considering hash partitioning on the product_id, simply to break data down and product_id is the largest dimension.About hash partitioning – in this case it is probably all about the ability to run in parallel. Do not have any info on that, so I cannot comment further.
>
sqls are varied, lots of different types some query all dimensions, sometimes a few. Not the straightforward date examples in the manual.You can pick a dimension that is frequently used by the SQLs. I understand that there is no perfect one, but even if you pick just a “good” one you might have a good deal of partition elimination.
>
Users run 3rd part ad-hoc reporting layer which has to allow them to report against the star in any way they want.
Star transformation hint enabled. Have heard in deciding number of hash partitions, partition size should geneerally be < 2gb.
e.g transactions for a given product for customers belonging to a given multiple in a given week
select trans_qty, trans_value, m.prod_name, m.prod_num, r.cust_name, w.branch_name, rtt.trans_date, rtt,trans_type
from retailer_transaction rt, media m, wholesaler w, calendar c, retailer r, trans_type rtt
where rt.issue_id = m.dimension_key
and m.prod_num = 600
and rt.branch_id = w.dimension_key
and rt.outlet_id = r.dimension_key
and r.multiple_num = 700
and rt.calendar_id = calendar.dimension_key
and m.issue_year_week = 201110
and rt.trans_type_id = rtt.dimension_keyLastly, you need to focus on weather and how to partition your indexes (I assume you have bunch of bitmaps). This decision is at least as important as partitioning the table. -
Boot Camp partition not listed in Windows XP setup menu
My macbook hard drive is 230 GB, and I made the Windows partition to be 100GB in Boot camp assistant. When I ran Windows XP Setup, my boot camp partition was not listed in the menu, just my entire hard drive. The setup disk I am using is Windows XP Home Edition SP2, so I know it's not compatibility issue. I tried it again at least 3 times, and it didn't work. Does anyone have a solution to this problem?
you need to install windows support software on a usb 2 flashdrive. more simply, start over in bootcamp, insert your usb drive as well as the dvd, check all 3 options. bootcamp will do the rest.
or it could be a problem with the install disc, why not download win 7 iso from here;
http://techverse.net/download-windows-7-iso-x86-x64-microsofts-official-servers/
and go with this, its perfectly legal to use your activation code during instalation. -
Automatic partition by list creation in 11gR2
Hi all,
Is it posibble with Oracle 11gR2 automatic partition creation by list?
Or is it possible only by range?
What I need is that whenever a new value (partitioned key) is inserted in a partitioned table, Oracle automatically creates a new partition based on that new value.
ThanksInterval partitioning currently only supports range partitions, and must be based on a column of number or date type.
http://download.oracle.com/docs/cd/E11882_01/server.112/e16541/part_admin001.htm#VLDBG1088
http://download.oracle.com/docs/cd/E11882_01/server.112/e16541/part_avail.htm#VLDBG1279 -
Boot Camp partition not listed in Windows Setup
I am trying to install Windows 7 with DVD and I used the Boot Camp assistant 5 run in OS X Mavericks (10.9.1). Everything was copied with latest drivers, created Boot Camp partition. After that Mac restarted and booted into the windows installation. I run install process and it says something like: "Any media were not found." No drive found here. So in this stage my install journey ends. If I going back to OS X and check Disk Utility, the Boot Camp partition is there. So I don't understand why the installation can't find any partitions even drives.
any solution for case this ?you need to install windows support software on a usb 2 flashdrive. more simply, start over in bootcamp, insert your usb drive as well as the dvd, check all 3 options. bootcamp will do the rest.
or it could be a problem with the install disc, why not download win 7 iso from here;
http://techverse.net/download-windows-7-iso-x86-x64-microsofts-official-servers/
and go with this, its perfectly legal to use your activation code during instalation. -
Domain index on list-partitioned table?
Hi,
I have a list-partitioned table, and wanted to create a partitioned Oracle Text index on it. I keep getting an error, and am now wondering if it's possible to do. Here is my syntax:
CREATE INDEX SCHEMA1.IDX_ALL_TEXT_LOCAL ON SCHEMA1.TABLE1(ALL_TEXT)
INDEXTYPE IS CTXSYS.CONTEXT
LOCAL
(PARTITION PTN1 PARAMETERS('sync (on commit) storage ptn1'),
PARTITION PTN2 PARAMETERS('sync (on commit) storage ptn2'),
PARTITION PTN3 PARAMETERS('sync (on commit) storage ptn3'),
PARTITION PTN4 PARAMETERS('sync (on commit) storage ptn4'),
PARTITION PTN5 PARAMETERS('sync (on commit) storage ptn5'),
PARTITION PTN6 PARAMETERS('sync (on commit) storage ptn6'),
PARTITION PTN7 PARAMETERS('sync (on commit) storage ptn7'),
PARTITION PTN8 PARAMETERS('sync (on commit) storage ptn8')
PARAMETERS('section group my_group lexer new_lexer');
ERROR at line 1:
ORA-29850: invalid option for creation of domain indexes
Any advice would be much appreciated.
Thanks,
Nora... will it spread the index across the tablespaces that are associated with each partition?No, as demonstrated below.
SCOTT@orcl_11gR2> CREATE TABLE table1
2 ( id NUMBER(6),
3 all_text VARCHAR2 (20)
4 )
5 PARTITION BY LIST (id)
6 (PARTITION ptn1 VALUES (2,4) TABLESPACE example,
7 PARTITION ptn2 VALUES (3,9) TABLESPACE example
8 )
9 /
Table created.
SCOTT@orcl_11gR2> INSERT ALL
2 INTO table1 VALUES (2, 'test2')
3 INTO table1 VALUES (3, 'test3')
4 INTO table1 VALUES (4, 'test4')
5 INTO table1 VALUES (9, 'test9')
6 SELECT * FROM DUAL
7 /
4 rows created.
SCOTT@orcl_11gR2> CREATE INDEX IDX_ALL_TEXT_LOCAL
2 ON TABLE1 (ALL_TEXT)
3 INDEXTYPE IS CTXSYS.CONTEXT
4 /
Index created.
SCOTT@orcl_11gR2> SELECT table_name, tablespace_name
2 FROM user_tab_partitions
3 WHERE table_name = 'TABLE1'
4 /
TABLE_NAME TABLESPACE_NAME
TABLE1 EXAMPLE
TABLE1 EXAMPLE
2 rows selected.
SCOTT@orcl_11gR2> SELECT table_name, tablespace_name
2 FROM user_tables
3 WHERE table_name LIKE '%IDX_ALL_TEXT_LOCAL%'
4 /
TABLE_NAME TABLESPACE_NAME
DR$IDX_ALL_TEXT_LOCAL$I USERS
DR$IDX_ALL_TEXT_LOCAL$R USERS
DR$IDX_ALL_TEXT_LOCAL$N
DR$IDX_ALL_TEXT_LOCAL$K
4 rows selected.
SCOTT@orcl_11gR2> -
Oracle 11g List - Range Partition - Help Needed
Hi All,
I want to create a composite partition (LIST-RANGE) but RANGE partition should using interval partition
This is my query .
CREATE TABLE "DMSDB"."DEVICE_UTILS"
( "ULID" VARCHAR2(100 CHAR),
"IP_ADDRESS" VARCHAR2(24 CHAR),
"PORT" VARCHAR2(8 CHAR),
"SHUTDOWN" NUMBER(10,0),
"LINE_TYPE" NUMBER(10,0) DEFAULT '0',
"OCCUPIED" NUMBER(10,0),
"UTILIZATION" NUMBER(10,0),
"IDLE_TIME" VARCHAR2(32 CHAR),
"ACTIVATION_TIME" VARCHAR2(32 CHAR),
"PULLED_DATE" TIMESTAMP (6) DEFAULT SYSDATE,
"ACCESS_TIME" TIMESTAMP (6) DEFAULT SYSDATE
PARTITION BY LIST(ULID)
PARTITION PART_DEVUTILS_ULID VALUES (DEFAULT)
SUBPARTITION BY RANGE( PULLED_DATE)
PARTITION PART_DEVUTILS_WEEK INTERVAL (NUMTOYMINTERVAL(1,'WEEK'))
Somehow its not working. can you please suggest where i am making mistake?Interval partitioning is not supported at the subpartition level.
http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_7002.htm#BABCDDIA
Regards
Girish Sharma -
Materialized View Log - Compress Clause for List Partition
Hi All,
In Syntax diagram it states that Compress Clause for List Partition of Materialized View Log is valid , but when we run any script with compress clause for list partition on Materialized view log then Database throws error as ORA-14020: this physical attribute may not be specified for a table partition
So in any chance we can have the compress clause for the partition of materialized view log.
Thanks in advance,
Manu.The "CREATE MATERIALIZED VIEW LOG" syntax refers to the "Table Partitioning" section of the CREATE TABLE documentation.
The "Table Partitioning" section refers to "table_partition_description" which then refers to "table_compression". "table_compression" then states that you can specify compression for entire table in the physical_properties clause and for range partition / list partition in the "table_partition_description". The Restrictions section on Table Compression says "You cannot define table compression explicitly for hash partitions or hash and list subpartitions" which implies that you can define partition for list partitions.
Moreover, error 14020 lists valid options for Range or Composite Range and for Hash partitoins -- which implies that all other Table physical attributes are applicable for List partitions. (But then, is Compression a physical attribute -- it is really part of "physical properties" not "physical attributes").
I think that the documentation isn't explicit enough and needs to be fixed.
N.B : Referencing the 10.2 documentation.
Hemant K Chitale
Edited by: Hemant K Chitale on Feb 1, 2010 4:12 PM -
I'm attempting to address some performance issues by using list partitioning (10g running on Windows Server 2003). As an experiment I created two small tables (~1000 rows) of vehicle maintenance data, one with no partitions the other partitioned by vehicle type:
create table myschema.mynewtable
tablespace mynewtablespace
parallel ( degree default )
nologging
monitoring
partition by list (vehicle_type) (
partition TRUCK values ('truck'),
partition CAR values ('car'),
partition SUV values ('suv'),
partition VAN values ('van')) as
select * from myschema.myoldtable;
Problem is that queries into the partitioned table take approx. twice as long to complete as compared to the non-partitioned table. Am I missing something here?
I also get the the following error when I view the table using the enterprise manager:
"Only range partitioned tables are supported in the current version"
As I stated before I am using 10g on Windows Server 2003.
Thanks in advance!Could you possibly compare the execution plans with and without the list partition? Are the stats recent? Looks like the EM doesn't support yet list partitioning, since this feature is so new (sorry, can't try this myself, don't have EM currently).
Daniel -
Problems with Partition pruning using LIST option in 9i
I am declaring the following partitions on a fact table and when
I do an explain plan on the following SELECT statements it is
doing a full table scan on the fact table. However if I use
the "PARTITION" statement in the FROM clause it picks up the
correct partition and runs great. I have used the analyze
command and dbms_utility.analyze_schema command on all tables
and indexes. I had simaliar problems when partitioning with the
RANGE options too. I have looked through all of the INIT file
parameters and don't see anything obvious. Is there something I
am missing?
Any help would be appreciated!
Thanks,
Bryan
Facttable create statement....
CREATE TABLE FactTable (
ProductGID INTEGER NULL,
CustomerGID INTEGER NULL,
OrganizationGID INTEGER NULL,
TimeGID INTEGER NULL,
FactValue NUMBER NOT NULL,
ModDate DATE NULL,
CombinedGID INTEGER NOT NULL)
PARTITION BY LIST (CombinedGID)
(PARTITION sales1 VALUES(9999101),
PARTITION sales2 VALUES(9999102),
PARTITION sales3 VALUES(9999103),
PARTITION model1 VALUES(9999204),
PARTITION model2 VALUES(9999205),
PARTITION model3 VALUES(9999206));
Select statement....that is causing a full table scan.....the
*tc tables are the equivelent to dimension tables in a star
schema.
SELECT tco.parentgid, tcc.parentgid, tcp.parentgid, sum
(factvalue)
FROM facttable f, custtc tcc, timetc tct, prodtc tcp, orgtc tco
WHERE
tco.childgid = f.organizationgid
AND tco.parentgid = 18262
AND tcc.childgid = f.customergid
AND tcc.parentmembertypegid = 16
AND tcp.childgid = f.productgid
AND tcp.parentmembertypegid = 7
AND tct.childgid = f.timegid
AND tct.parentgid = 1009
GROUP BY tco.parentgid, tcc.parentgid, tcp.parentgid;
Select statement that works great....
SELECT tco.parentgid, tcc.parentgid, tcp.parentgid, sum
(factvalue)
FROM facttable partition(sales1) f, custtc tcc, timetc tct,
prodtc tcp, orgtc tco
WHERE
tco.childgid = f.organizationgid
AND tco.parentgid = 18262
AND tcc.childgid = f.customergid
AND tcc.parentmembertypegid = 16
AND tcp.childgid = f.productgid
AND tcp.parentmembertypegid = 7
AND tct.childgid = f.timegid
AND tct.parentgid = 1009
GROUP BY tco.parentgid, tcc.parentgid, tcp.parentgid;Hi Hoek,
the DB version is 10.2 (italian version, then SET is correct).
...there's something strange: now I can INSERT rows but I can't update them!
I'm using this command string:
UPDATE TW_E_CUSTOMER_UNIFIED SET END_VALIDITY_DATE = TO_DATE('09-SET-09', 'DD-MON-RR') WHERE
id_customer_unified = '123' and start_validity_date = TO_DATE('09-SET-09', 'DD-MON-RR');
And this is the error:
Error SQL: ORA-14402: updating partition key column would cause a partition change
14402. 00000 - "updating partition key column would cause a partition change"
*Cause: An UPDATE statement attempted to change the value of a partition
key column causing migration of the row to another partition
*Action: Do not attempt to update a partition key column or make sure that
the new partition key is within the range containing the old
partition key.
I think that is impossible to use a PARTITION/SUBPARTITION like that: in fact the update of "END_VALIDITY_DATE" cause a partition change.
Do u agree or it's possible an update on a field that implies a partition change?
Regards Steve
Maybe you are looking for
-
Trying to use laf project for the first time
hi all , i need help , please i am trying to use laf project for the first time as i said , and i want help on the installation process step by step please , i am soo junior here i've just downloaded the zip file as the site said (http://fdtool.free.
-
RE: Polymorphism - retrieving type information from thedatabase or how
Don, Ok but if I was to model a real restaurant, I would then have a head chef that can then delegate to other chefs. This head chef would have the additional task of coordinating the completion of subservient chefs. This does not and would not mean
-
How to print to my wireless all in one photosmart prem c410 when printer is not powered on?
how to print to my wireless all in one photosmart prem c410 when printer is not powered on?
-
I have some JLabel, as statusBar, when user diminishes the width of jframe the text of the jlabel is overlapped to the text of other jlabel, therefore the text becomes not leggibile I would want that when the user diminishes the width of the frame, t
-
Presentation on career and training
Dear All, We are implementing ESS/MSS mySAP2005 Bussiness packages with Portal 7.0. Also, upgraded the 4.6c to ECC 6.0. We have succefully deployed Bussiness packages using sdm. In 4.6c ITS, there were Training and skills applications which allows to