Reduce chaining / increase density in partitioned table
Hi,
I have a large table, partitioned by date, with each partition containing ~ 10 M rows. Partitions older than a month are changed only very rarely. Because of the way the rows were created - INSERT followed by several UPDATEs - there is a high degree of row chaining within this table. Older partitions in the table are mostly accessed via indexes.
I want to eliminate (or nearly eliminate) row chaining, and increase the number of rows per block in the older partitions. After reading http://www.akadia.com/services/ora_chained_rows.html I tried to do this (halving the PCTFREE value):
ALTER table MY_BIG_TABLE MOVE partition OLD_PARTITION
PCTFREE 5
PCTUSED 40
STORAGE (INITIAL 20K
NEXT 40K
MINEXTENTS 2
MAXEXTENTS 20
PCTINCREASE 0);
However, I found this had no affect whatsoever on the degree of chaining or the number of blocks used - I assume that no actual block rewriting took place.
Is there away to force the rewrite of the blocks, on a partition by partition basis, without doing an export/import or truncate and re-INSERT? Are there any potentially useful options for row compression?
any pointers appreciated!
thanks,
James
V 10.1.0.4.0, while I remember.
Similar Messages
-
How to delete the data from partition table
Hi all,
Am very new to partition concepts in oracle..
here my question is how to delete the data from partition table.
is the below query will work ?
delete from table1 partition (P_2008_1212)
we have define range partition ...
or help me how to delete the data from partition table.
Thanks
Sree874823 wrote:
delete from table1 partition (P_2008_1212)This approach is wrong - as Andre pointed, this is not how partition tables should be used.
Oracle supports different structures for data and indexes. A table can be a hash table or index organised table. It can have B+tree index. It can have bitmap indexes. It can be partitioned. Etc.
How the table implements its structure is a physical design consideration.
Application code should only deal with the logical data structure. How that data structure is physically implemented has no bearing on application. Does your application need to know what the indexes are and the names of the indexes,in order to use a table? Obviously not. So why then does your application need to know that the table is partitioned?
When your application code starts referring directly to physical partitions, it needs to know HOW the table is partitioned. It needs to know WHAT partitions to use. It needs to know the names of the partitions. Etc.
And why? All this means is increased complexity in application code as this code now needs to know and understand the physical data structure. This app code is now more complex, has more moving parts, will have more bugs, and will be more complex to maintain.
Oracle can take an app SQL and it can determine (based on the predicates of the SQL), which partitions to use and not use for executing that SQL. All done totally transparently. The app does not need to know that the table is even partitioned.
This is a crucial concept to understand and get right. -
Local Vs Global Index on partitioned table?
Hello All,
DESC PS_P1_EMP_QRYSCRTY
Name Null? Type
EMPLID NOT NULL VARCHAR2(11)
EMPL_RCD NOT NULL NUMBER(38)
ROWSECCLASS NOT NULL VARCHAR2(30)
ACCESS_CD CHAR(1)
MY SQL QUERY IS:-
SELECT DISTINCT OPR.OPRID , EMP.EMPLID ,EMP.EMPL_RCD , OPR.CLASSID ,'Y'
FROM PS_SJT_OPR_CLS OPR , PS_P1_EMP_QRYSCRTY EMP
WHERE EMP.ROWSECCLASS=OPR.CLASSID
This query was taking around 15 mins to run at sql-prompt
I have created a partitioned table based on PS_P1_EMP_QRYSCRTY :-
CREATE TABLE PS_P1_EMP_QRYSCRTY_BAK
TABLESPACE PSNEWTAB
PARTITION BY HASH(ROWSECCLASS)
( PARTITION PART1 ,
PARTITION PART2 ,
PARTITION PART3 ,
PARTITION PART4 ,
PARTITION PART5 ,
PARTITION PART6 ,
PARTITION PART7 ,
PARTITION PART8 ,
PARTITION PART9 ,
PARTITION PART10 ,
PARTITION PART11 ,
PARTITION PART12 ,
PARTITION PART13 ,
PARTITION PART14 ,
PARTITION PART15 ,
PARTITION PART16
ENABLE ROW MOVEMENT
AS SELECT * FROM PS_P1_EMP_QRYSCRTY
I created a local index like on PS_P1_EMP_QRYSCRTY_BAK
CREATE INDEX PS_P1_EMP_QRYSCRTY_BAK
ON PS_P1_EMP_QRYSCRTY_BAK(ROWSECCLASS,EMPLID,EMPL_RCD)
TABLESPACE PSINDEX
LOCAL;
The Following is an extract From PS_P1_EMP_QRYSCRTY_BAK
1ST COLUMN =TABLE NAME
2ND COLUMN = PARTITION NAME
3RD COLUMN = NUM OF DISTINCT ROWSECCLASS IN THE PARTITION
4TH COLUMN = NUM OF TOTAL ROWS IN THE PARTITION
TABLE_NAME PARTITION_NAME NUM_OF_DISTINCT_ROWSECCLASS NUM_OF_ROWS
PS_P1_EMP_QRYSCRTY_BAK | PART1 | 25 | 289058
PS_P1_EMP_QRYSCRTY_BAK | PART2 | 25 | 154537
PS_P1_EMP_QRYSCRTY_BAK | PART3 | 27 | 364219
PS_P1_EMP_QRYSCRTY_BAK | PART4 | 33 | 204528
PS_P1_EMP_QRYSCRTY_BAK | PART5 | 23 | 527974
PS_P1_EMP_QRYSCRTY_BAK | PART6 | 22 | 277210
PS_P1_EMP_QRYSCRTY_BAK | PART7 | 23 | 517125
PS_P1_EMP_QRYSCRTY_BAK | PART8 | 30 | 307634
PS_P1_EMP_QRYSCRTY_BAK | PART9 | 28 | 523169
PS_P1_EMP_QRYSCRTY_BAK | PART10 | 38 | 192565
PS_P1_EMP_QRYSCRTY_BAK | PART11 | 27 | 120062
PS_P1_EMP_QRYSCRTY_BAK | PART12 | 33 | 407829
PS_P1_EMP_QRYSCRTY_BAK | PART13 | 37 | 522349
PS_P1_EMP_QRYSCRTY_BAK | PART14 | 25 | 275991
PS_P1_EMP_QRYSCRTY_BAK | PART15 | 21 | 259676
PS_P1_EMP_QRYSCRTY_BAK | PART16 | 23 | 468071
SELECT DISTINCT OPR.OPRID , EMP.EMPLID ,EMP.EMPL_RCD , OPR.CLASSID ,'Y'
FROM PS_SJT_OPR_CLS OPR , PS_P1_EMP_QRYSCRTY_BAK EMP
WHERE EMP.ROWSECCLASS=OPR.CLASSID
Now when i run this query it gives result in around 5-6 mins
MY PS_P1_EMP_QRYSCRTY_BAK table contains sumwhat 6 million rows...
Now My Questions are:-
1) Is the number of partition done by me optimal under these circumstances...i mean can i get better performance By increasing or decreasing the number of partitions.
2) I created local index on PS_P1_EMP_QRYSCRTY_BAK.
Whether creating local or global index will be more beneficial keeping in mind the where clause and Select clause of the query....
SELECT DISTINCT OPR.OPRID , EMP.EMPLID ,EMP.EMPL_RCD , OPR.CLASSID ,'Y'
FROM PS_SJT_OPR_CLS OPR , PS_P1_EMP_QRYSCRTY_BAK EMP
WHERE EMP.ROWSECCLASS=OPR.CLASSID
i mean in where clause rowsecclass is used thats why i partitioned my table on ROWSECCLASS.
And in select clause i m selecting EMPLID and EMPL_RCD
Thats y i made a local index on ROWSECCLASS,EMPLID ,EMPL_RCD .
Thanks
--Pradeep1) Is the number of partition done by me optimal under these circumstances...i mean can i get better performance >By increasing or decreasing the number of partitions.
2) I created local index on PS_P1_EMP_QRYSCRTY_BAK.
Whether creating local or global index will be more beneficial keeping in mind the where clause and Select clause of >the query....You'll have to see for yourself what is optimal. Every system is different. Here are some ideas, though.
Your query
SELECT DISTINCT OPR.OPRID , EMP.EMPLID ,EMP.EMPL_RCD , OPR.CLASSID ,'Y'
FROM PS_SJT_OPR_CLS OPR , PS_P1_EMP_QRYSCRTY_BAK EMP
WHERE EMP.ROWSECCLASS=OPR.CLASSIDappears to read all qualifying rows across all qualifying partitions. Since you are partitioning by an id that would appear to exclude range and list partitioning instead so the hash partition is probably the best for your application.
Regarding global vs local partitions, I have seen timings indicate that global indexes can improve cross-partition queries slighly. I have not worked with partitions for a while but remember that global partition maintenance is difficult; anything the partition structure changes the global index had to be rebuild. You can check the documentation to see if that has changed.
If possible creating a unique index should give better performance than using an index allowing duplicates. -
Compression getting disabled when performing Update on partitioned tables
Hi All,
I am on Oracle Database 11g Enterprise Edition Release 11.2.0.3.0.
My question is related to Oracle Compression.
I have a sub-partitioned table enabled with Basic Compression. In enabled compressed state, I am updating few columns of this table(Normal Update command and Merge as well) but the end result shows increase in the table size and the compression is still in ENABLED state. Post that, if I compress the sub-partition explicitly the table comes back to its original size.
Is it a bug? I read a white paper on 11g itself, that compression remains enabled in case of all DML operations, then why this behaviour?
Thanks,
IshanIshan,
taking a look at http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#CJAGFBFG It seems that the distinction between OLTP and basic compression is sometimes a little bit vague ("Operations that permit compression include: ..."), but I can also find the statement "Rows inserted without using direct-path insert and updated rows are uncompressed." So I would say it's not a bug but a limitation of the feature. Updates just don't mix well with compression.
Martin -
How to manage large partitioned table
Dear all,
we have a large partitioned table with 126 columns and 380G not indexed can any one tell me how to manage it because now the queries are taking more that 5 days
looking forward for your reply
thank youHi,
You can store partitioned tables in separate tablespaces. This does the following:
Reduce the possibility of data corruption in multiple partitions
Back up and recover each partition independently
Control the mapping of partitions to disk drives (important for balancing I/O load)
Improve manageability, availability, and performance
Remeber as the doc states :
The maximum number of partitions or subpartitions that a table may have is 1024K-1.
Lastly you can use SQL*Loader and the import and export utilities to load or unload data stored in partitioned tables. These utilities are all partition and subpartition aware.
Document Reference:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14231/partiti.htm
Adith -
Ubuntu wrecked partition table. Help to fix?
(Macbook Pro 2013 15" Crystalwell 4 Core, 500GB SSD 16GB RAM)
I should have known that installing Ubuntu next to Bootcamp was a bad idea.
So here's what's up... Before this whole debacle began I had two separate partitions on my SSD. The primary partition was for Mavericks with 300GB. The second partition was to a Bootcamped Windows 7 with 150 GB of space. I left 50GB free between the two, which still left me at
disk0s1 for EFI, ~200 MB
disk0s2 for Macintosh HD, 300 GB
disk0s3 for Recovery HD 650 MB
disk0s4 for Bootcamp 148 GB
Here's where my problem began. Genius me decided to attempt to install Ubuntu via live USB onto the 50GB space in between. I have reFIT installed so this wasn't a problem. After loading into Ubuntu and realizing that it wouldn't load into the 50GB space, I rebooted and installed alongside Windows (through the Ubuntu live usb) following the install GUI Prompt.
The installation failed after it got hung on a CRON command and drained the battery from my unplugged computer sitting next to me in my bed (I fell asleep waiting for it to finish, even though it was at 100% battery when it started the installation). When I woke up my computer was dead, so I plugged it in. I started reFIT and booted into Windows after seeing that Ubuntu wasn't there. I was given the "Choose OS" prompt from Windows and Ubuntu wouldn't load, so I said screw it and went back to Mavericks. When I opened my Disk utility partitions table to see where it might have gone wrong....
Great Odin's Raven.
I now had ext4 partitions sitting above my bootcamp partition and linux-swap partitions below it. Absolutely no free space. I switched back to Windows, avoiding the failed Ubuntu OS, and uninstalled wubi from Windows (the universal uninstall for ubuntu, I used the Windows "uninstall application" application from Control Center), hopefully deleting the mess it had made of my drive table.
It didn't.
Since I couldn't delete the partitions back to free space around my bootcamp volume using Disk utility (insufficient hfs+ permissions or something like that), I decided to take a more agressive option. I installed partedMagic onto a live USB and once again rebooted my computer into the live USB. I went in and using gParted removed the partitions in front of the bootcamp volume and behind it reducing them to empty space. Good! Hoping for the best I went back to reFIT and booted into Windows...
"No bootable device -- insert boot disk and press any key"
Well crap.
After some more research into why this wasn't working, I was sure that somehow my EFI wasn't loading the right area of my hard drive. Then I think I found out what happened. I ran diskutil list from terminal and saw this..
IceMan-HomeBase:~ Tim$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 300.2 GB disk0s2
3: Apple_HFS Recovery HD 650.0 MB disk0s3
4: Microsoft Basic Data BOOTCAMP 148.0 GB disk0s6
disk0s6. There's the problem. Mac doesn't like anything beyond disk0s4, which is where Bootcamp was originally and where it should be now, at disk0s4.
If it were merely an issue of copying the bootcamp volume and repartitioning the hard drive, that wouldn't be a problem, but even WinClone doesn't like this volume. When I tried to do a copy, it threw an error saying "Invalid partition ID of 6"
Here is my question.
Is there a way to change the IDENTIFIER back to disk0s4 from disk0s6 and save my Windows 7 partition, is there some other way to save my files to a backup and clean install, or is he dead, Jim?
Sorry if this was a little long-winded, but I figured too much information would be better than not enough.
Thank you in advance for anyone brave enough to read this.
TL;DR
Partition table went bogus because of a bad Ubuntu OS install. Windows can't find a bootable device. Disk0s4 is now disk0s6. Possible way to change this?Problem solved, I used iPartition to resize the partition back to its original size after which I could copy all data off.
-
How's this partition table for my server?
How's this partition table for my server? Web/DNS/DHCP/Mail Server.
hdd1: ~8gb total
/boot - 100mb
swap - 1gb
/ - rest of drive
hdd2: ~155gb total
/var - whole drive
This is a Compaq ProLiant 5500 server with 10 drives. Will most things be installed inside /var or what?Zetsumei wrote:Web/DNS/DHCP/Mail Server.
Web = /srv
DNS = /var
DHCP = /var
Mail = Depends which package you use. I use postfix and told it to use /srv
I would half your swap, reduce /var and put the extra space into /srv
Also create a separate /tmp and /home to prevent accidental or deliberate DoS attacks by filling your / partition
Here's what I use on my Web / DNS / FTP server:
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 493M 176M 317M 36% /
/dev/xvdc 31M 674K 29M 3% /boot
/dev/lvmData-home 62M 26M 34M 44% /home
/dev/lvmData-usr 2.0G 848M 1.1G 45% /usr
/dev/lvmData-tmp 496M 20M 451M 5% /tmp
/dev/lvmData-srv 1.5G 769M 667M 54% /srv
/dev/lvmData-var 496M 231M 241M 49% /var
/dev/lvmData-pacman 384M 303M 82M 79% /var/cache/pacman
/dev/lvmData-backup 5.5G 4.6G 565M 90% /mnt/backup -
Partition Eliminiation on views and joins with other partitioned tables
I have a bunch of tables that are daily partioned and other which are not. We constantly join all these tables. I have noticed that partition elimination doesn't happen in most cases and I want some input or pointers on these.
Case 1
We have a view that joins a couple of partitioned tables on the id fileds and they the partition key is timestamp with local time zone.
TABLEA
tableaid
atime
TABLEB
tablebid
tableaid
btime
The view basically joins on tableaid, a.tableaid = b.tableaid(+) and a bunch of other non partitioned tables. atime and btime are the individal partition keys in the tables and these time do not match up like the id's in other words there is a little bit of correlation but they can be very different.
When I run a query against the view providing a time range for btime, I see partition elimination on tabled in the explain plan with KEY on Pstart/Pstop. But its a full tablescan on tablea. I was hoping there would be somekind of partition elimination here since its also partioned daily on the same datatype timestamp with local time zone.
Case 2
I have a couple of more partitioned tables
TABELC
tablecid
tablebid
ctime
TABLED
tabledid
tablebid
dtime
As you can see these tables are joined with tablebid and the times here generally correlate to tableb's timestamp as well.
Sub Case 1
When I join these tables to the view and give a time range on btime, I see partition elimination happening on tableb but not on tablea or any of the other tables.
Sub Case 2
Then I got rid of the view, wrote a query that us similar to the view where I join on tableaid (tablea and tableb), then on tablebid (tableb, tablec and tabled) and a few other tables and execute the query with some time range on btime and I still see that partition elimination happens only on tableb.
I thought that if other tables are also partitioned on a similark key that partition eliminition should happen? Or what am I missing here that is preventing from partition elimination on the other tables.Performance is of utmost importance and partition pruning is going to help in that. I guess that's what I'm trying to acheive.
To achive partition elimination on tablec, d, etc I'm doing an outer join with btime and that seems to work. Also since most of the time after the partition elimination, I don't need a full tablescan since the period I will be querying most of the time will be small I also created a local index on id field that I'm using to join so that it can do a "TABLE ACCESS BY LOCAL INDEX ROWID" this way it should peform better than a global index since the index traversal path should be small when compared to the global index.
Of couse I still have problem with the tablea not being pruned, since I cannot do an outer join on two fields in the same table (id and time). So might just include the time criteria again and may be increase the time range a little more when compared to what the actual user submitted to try not to miss those rows.
Any suggestions is always welcome. -
Hopefully someone can help me as I'm about to go mad......
My x200 says that my Boot configuration is corrupt and that to repair it I have do a 'partition table repair' error code 0x490
I have tried to use the recovery cd's but each time they try and restore to factory original settings it says becuase there had been a previous attemp to restore which was stopped early the Boot Configuration isn't complete and I dont have enough room on the partition swload c: to carryon - again its saying to increase the size of the partition swload c: but I don't know how !!!!!!!
I've looked in the BIOS setup but cant see anything in there about partitions......
Can anybody help please :-((
Message Edited by Christian333 on 01-18-2009 06:06 AMChristian333, welcome to the forum,
I personally have never heard of your problem, others may have, but I would start by running Drive Fitness Test from Hitachi to check the hard drive. Even if you don't have an Hitachi drive it will say whether or not the drive is OK. I always run it from CD.
If the drive is OK I would then run Secure Data Disposal at it's lowest level in order to eliminate anything in the boot sectors and then afterwards the recovery discs. If problems are then experienced it's time to call service.
Hope this helps
Andy ______________________________________
Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
Deutsche Community Comunidad en Español English Community Русскоязычное Сообщество
PepperonI blog -
Error while creating partition table
Hi frnds i am getting error while i am trying to create a partition table using range
getting error ORA-00906: missing left parenthesis.I used the following statement to create partition table
CREATE TABLE SAMPLE_ORDERS
(ORDER_NUMBER NUMBER,
ORDER_DATE DATE,
CUST_NUM NUMBER,
TOTAL_PRICE NUMBER,
TOTAL_TAX NUMBER,
TOTAL_SHIPPING NUMBER)
PARTITION BY RANGE(ORDER_DATE)
PARTITION SO99Q1 VALUES LESS THAN TO_DATE(‘01-APR-1999’, ‘DD-MON-YYYY’),
PARTITION SO99Q2 VALUES LESS THAN TO_DATE(‘01-JUL-1999’, ‘DD-MON-YYYY’),
PARTITION SO99Q3 VALUES LESS THAN TO_DATE(‘01-OCT-1999’, ‘DD-MON-YYYY’),
PARTITION SO99Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2000’, ‘DD-MON-YYYY’),
PARTITION SO00Q1 VALUES LESS THAN TO_DATE(‘01-APR-2000’, ‘DD-MON-YYYY’),
PARTITION SO00Q2 VALUES LESS THAN TO_DATE(‘01-JUL-2000’, ‘DD-MON-YYYY’),
PARTITION SO00Q3 VALUES LESS THAN TO_DATE(‘01-OCT-2000’, ‘DD-MON-YYYY’),
PARTITION SO00Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2001’, ‘DD-MON-YYYY’)
;More than one of them. Try this instead:
CREATE TABLE SAMPLE_ORDERS
(ORDER_NUMBER NUMBER,
ORDER_DATE DATE,
CUST_NUM NUMBER,
TOTAL_PRICE NUMBER,
TOTAL_TAX NUMBER,
TOTAL_SHIPPING NUMBER)
PARTITION BY RANGE(ORDER_DATE) (
PARTITION SO99Q1 VALUES LESS THAN (TO_DATE('01-APR-1999', 'DD-MON-YYYY')),
PARTITION SO99Q2 VALUES LESS THAN (TO_DATE('01-JUL-1999', 'DD-MON-YYYY')),
PARTITION SO99Q3 VALUES LESS THAN (TO_DATE('01-OCT-1999', 'DD-MON-YYYY')),
PARTITION SO99Q4 VALUES LESS THAN (TO_DATE('01-JAN-2000', 'DD-MON-YYYY')),
PARTITION SO00Q1 VALUES LESS THAN (TO_DATE('01-APR-2000', 'DD-MON-YYYY')),
PARTITION SO00Q2 VALUES LESS THAN (TO_DATE('01-JUL-2000', 'DD-MON-YYYY')),
PARTITION SO00Q3 VALUES LESS THAN (TO_DATE('01-OCT-2000', 'DD-MON-YYYY')),
PARTITION SO00Q4 VALUES LESS THAN (TO_DATE('01-JAN-2001', 'DD-MON-YYYY')))In the future, if you are having problems, go to Morgan's Library at www.psoug.org.
Find a working demo, copy it, then modify it for your purposes. -
Local index vs global index in partitioned tables
Hi,
I want to know the differences between a global and a local index.
I'm working with partitioned tables about 10 millons rows and 40 partitions.
I know that when your table is partitioned and your index non-partitioned is possible that
some database operations make your index unusable and you have tu rebuid it, for example
when yo truncate a partition your global index results unusable, is there any other operation
that make the global index unusable??
I think that the advantage of a global index is that takes less space than a local and is easier to rebuild,
and the advantage of a local index is that is more effective resolving a query isn't it???
Any advice and help about local vs global index in partitioned tables will be greatly apreciatted.
Thanks in advancehere is the documentation -> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/partconc.htm#sthref2570
In general, you should use global indexes for OLTP applications and local indexes for data warehousing or DSS applications. Also, whenever possible, you should try to use local indexes because they are easier to manage. When deciding what kind of partitioned index to use, you should consider the following guidelines in order:
1. If the table partitioning column is a subset of the index keys, use a local index. If this is the case, you are finished. If this is not the case, continue to guideline 2.
2. If the index is unique, use a global index. If this is the case, you are finished. If this is not the case, continue to guideline 3.
3. If your priority is manageability, use a local index. If this is the case, you are finished. If this is not the case, continue to guideline 4.
4. If the application is an OLTP one and users need quick response times, use a global index. If the application is a DSS one and users are more interested in throughput, use a local index.
Kind regards,
Tonguç -
Insert statement does not insert all records from a partitioned table
Hi
I need to insert records in to a table from a partitioned table.I set up a job and to my surprise i found that the insert statement is not inserting all the records on the partitioned table.
for example when i am using select statement on to a partitioned table
it gives me 400 records but when i insert it gives me only 100 records.
can anyone help in this matter.INSERT INTO TABLENAME(COLUMNS)
(SELECT *
FROM SCHEMA1.TABLENAME1
JOIN SCHEMA2.TABLENAME2a
ON CONDITION
JOIN SCHEMA2.TABLENAME2 b
ON CONDITION AND CONDITION
WHERE CONDITION
AND CONDITION
AND CONDITION
AND CONDITION
AND (CONDITION
HAVING SUM(COLUMN) > 0
GROUP BY COLUMNS -
Performance issues with version enable partitioned tables?
Hi all,
Are there any known performance issues with version enable partitioned tables?
Ive been doing some performance testes with a large version enable partitioned table and it seems that OCB optimiser is choosing very expensive plans during merge operations.
Tanks in advance,
Vitor
Example:
Object Name Rows Bytes Cost Object Node In/Out PStart PStop
UPDATE STATEMENT Optimizer Mode=CHOOSE 1 249
UPDATE SIG.SIG_QUA_IMG_LT
NESTED LOOPS SEMI 1 266 249
PARTITION RANGE ALL 1 9
TABLE ACCESS FULL SIG.SIG_QUA_IMG_LT 1 259 2 1 9
VIEW SYS.VW_NSO_1 1 7 247
NESTED LOOPS 1 739 247
NESTED LOOPS 1 677 247
NESTED LOOPS 1 412 246
NESTED LOOPS 1 114 244
INDEX RANGE SCAN WMSYS.MODIFIED_TABLES_PK 1 62 2
INDEX RANGE SCAN SIG.QIM_PK 1 52 243
TABLE ACCESS BY GLOBAL INDEX ROWID SIG.SIG_QUA_IMG_LT 1 298 2 ROWID ROW L
INDEX RANGE SCAN SIG.SIG_QUA_IMG_PKI$ 1 1
INDEX RANGE SCAN WMSYS.WM$NEXTVER_TABLE_NV_INDX 1 265 1
INDEX UNIQUE SCAN WMSYS.MODIFIED_TABLES_PK 1 62
/* Formatted on 2004/04/19 18:57 (Formatter Plus v4.8.0) */
UPDATE /*+ USE_NL(Z1) ROWID(Z1) */sig.sig_qua_img_lt z1
SET z1.nextver =
SYS.ltutil.subsversion
(z1.nextver,
SYS.ltutil.getcontainedverinrange (z1.nextver,
'SIG.SIG_QUA_IMG',
'NpCyPCX3dkOAHSuBMjGioQ==',
4574,
4575
4574
WHERE z1.ROWID IN (
(SELECT /*+ ORDERED USE_NL(T1) USE_NL(T2) USE_NL(J2) USE_NL(J3)
INDEX(T1 QIM_PK) INDEX(T2 SIG_QUA_IMG_PKI$)
INDEX(J2 WM$NEXTVER_TABLE_NV_INDX) INDEX(J3 MODIFIED_TABLES_PK) */
t2.ROWID
FROM (SELECT /*+ INDEX(WM$MODIFIED_TABLES MODIFIED_TABLES_PK) */
UNIQUE VERSION
FROM wmsys.wm$modified_tables
WHERE table_name = 'SIG.SIG_QUA_IMG'
AND workspace = 'NpCyPCX3dkOAHSuBMjGioQ=='
AND VERSION > 4574
AND VERSION <= 4575) j1,
sig.sig_qua_img_lt t1,
sig.sig_qua_img_lt t2,
wmsys.wm$nextver_table j2,
(SELECT /*+ INDEX(WM$MODIFIED_TABLES MODIFIED_TABLES_PK) */
UNIQUE VERSION
FROM wmsys.wm$modified_tables
WHERE table_name = 'SIG.SIG_QUA_IMG'
AND workspace = 'NpCyPCX3dkOAHSuBMjGioQ=='
AND VERSION > 4574
AND VERSION <= 4575) j3
WHERE t1.VERSION = j1.VERSION
AND t1.ima_id = t2.ima_id
AND t1.qim_inf_esq_x_tile = t2.qim_inf_esq_x_tile
AND t1.qim_inf_esq_y_tile = t2.qim_inf_esq_y_tile
AND t2.nextver != '-1'
AND t2.nextver = j2.next_vers
AND j2.VERSION = j3.VERSION))Hello Vitor,
There are currently no known issues with version enabled tables that are partitioned. The merge operation may need to access all of the partitions of a table depending on the data that needs to be moved/copied from the child to the parent. This is the reason for the 'Partition Range All' step in the plan that you provided. The majority of the remaining steps are due to the hints that have been added, since this plan has provided the best performance for us in the past for this particular statement. If this is not the case for you, and you feel that another plan would yield better performance, then please let me know and I will take a look at it.
One suggestion would be to make sure that the table was been recently analyzed so that the optimizer has the most current data about the table.
Performance issues are very hard to fix without a reproducible test case, so it may be advisable to file a TAR if you continue to have significant performance issues with the mergeWorkspace operation.
Thank You,
Ben -
"GUID partition table scheme" Can't install snow leopard on my mbp.
I have a mbp that is partitioned as half mac, half XP. I put in the snow leopard CD and came up with an error that said I could not istall snow leopard because my partition did not fit the "GUID partition table scheme". I followed the menues to the partition section of the disk utility. From there, I don't know what to do. I can't click on the "options" button to change to the GUILD thing. Do I need to repartition my entire mbp? Will this erase my other partition? And will it delete all my data? Any suggestions on what to do???
GUID partition table (GPT) or map is a set of instructions at the very begining of a storage drive to tell the hardware what partitions and formats are where on the drive.
A Intel Mac now requires a GPT to boot OS X as it uses EFI (Extensible Firmware Interface) which is a software firmware in a hidden EFI partition on the boot drive designed originally for copy protection by Intel. EFI loads into memory before OS X does, which can be seen if you have verbose mode activated upon boot time.
Setting up the boot drive with a GUID Partiton table WILL require backing up of all data off the machine and a complete erasure of ALL partitions on the drive, which includes ALL data, programs, operating systems and files not backed up off the machine previously.
Since a partition map is basically road directions, when it's destroyed so does go the partitions.
Also since you will be fresh installing 10.6, your free iLife won't tag along,, however you can erase/install 10.5 first then upgrade to 10.6 (no BootCamp) and that shoudl work.
Unfortunatly Mac's only now support Windows 7 in Bootcamp, however Windows 7 Pro (and above) will run XP programs natively or via free virtual machine XP downloaded from Microsoft, however since it's really not native, 3D games etc likely won't run very well.
If your not familiar or willing to take a chance, then I suggest you have someone else upgrade that machine.
https://discussions.apple.com/community/notebooks/macbook_pro?view=documents -
How can I add a new column in compress partition table.
I have a compress partition table when I add a new column in that table it give me an error "ORA-22856: CANNOT ADD COLUMNS TO OBJECT TABLES". I had cretaed a table in this clause. How can I add a new column in compress partition table.
CREATE TABLE Employee
Empno Number,
Tr_Date Date
COMPRESS PARTITION BY RANGE (Tr_Date)
PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
PARTITION JUNK Values LESS THAN (MAXVALUE));
Note :
When I create table with this clause it will allow me to add a column.
CREATE TABLE Employee
Empno Number,
Tr_Date Date
PARTITION BY RANGE (Tr_Date)
PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
PARTITION JUNK Values LESS THAN (MAXVALUE));
But for this I have to drop and recreate the table and I dont want this becaue my table is in online state i cannot take a risk. Please give me best solution.Hi Fahed,
I guess, you are using Oracle 9i Database Release 9.2.0.2 and the Table which you need to alter is in OLTP environment where data is usually inserted using regular inserts. As a result, these tables generally do not get much benefit from using table compression. Table compression works best on read-only tables that are loaded once but read many times. Tables used in data warehousing applications, for example, are great candidates for table compression.
Reference : http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_data.html
Topic : When to Use Table Compression
Bug
Reference : http://dba.ipbhost.com/lofiversion/index.php/t147.html
BUG:<2421054>
Affects: RDBMS (9-A0)
NB: FIXED
Abstract: ENH: Allow ALTER TABLE to ADD/DROP columns for tables using COMPRESS feature
Details:
This is an enhancement to allow "ALTER TABLE" to ADD/DROP
columns for tables using the COMPRESS feature.
In 9i errors are reported for ADD/DROP but the text may
be misleading:
eg:
ADD column fails with "ORA-22856: cannot add columns to object tables"
DROP column fails with "ORA-12996: cannot drop system-generated virtual column"
Note that a table which was previously marked as compress which has
now been altered to NOCOMPRESS also signals such errors as the
underlying table could still contain COMPRESS format datablocks.
As of 10i ADD/SET UNUSED is allowed provided the ADD has no default value.
Best Regards,
Muhammad Waseem Haroon
[email protected]
Maybe you are looking for
-
my iMac has crashed...was told I need a new hard drive.....meantime I bought a mac mini.....I had an external drive connected to the mac....and was using time machine for backups....so....how do i move itunes music files to my new mac mini from the e
-
BPS Processing Question for 2 Planning Cubes
Hello, Can you please give input on the following scenario: We have 2 planning cubes, cube 1 contains selection criteria records which will be used to select and process the detail records from planning cube 2. i.e. Sales Org = 100, Material= 200, Pc
-
Autonumber formats change after topics are linked across projects
We are going from Robohelp HTML x5.0.2 to Robohelp HTML 8.0.2.208, so there is obviously a huge learning curve that we are working through. We generate to WebHelp and merge 15 projects into a published master. Our users view the output on our intra
-
I want to upgrade my iMac to Snow Leopard, can I use the (DVD-Mac OS X 10.6.3) that I got with my purchase of the 15" MacBook Pro that totally died, and upgrade the iMac from that DVD that came with the laptop ? Thanks
-
DVDSP not compiling after OS upgrade
I have a new problem. After upgrading from Mac OS 10.3.9 to 10.4.3, when trying to burn a DVD in DVD Studio Pro 3.0.2, I get the message "Formatting failed. Building was not successful." The Log says "Compiler File Error." I have a Backup Hard Drive