Re: Local Partitioning
Hi,
If you intend it on the first time you make a partitioning,
just define your client node as Client only on the environment. So
the environment visible service objects will automatically be assigned
to server nodes.
Hope this helps.
Daniel Nguyen.
Freelance Forte Consultant.
Daniel Chang wrote:
>
I was wondering if anybody knew how to force a Service Object to be
partitioned onto the server without it being a DB service object or C
shared library when partitioning for a local run instead of running
distributed?
Greatly appreciate it.
Another useful reply! What a great news group this is.
One last thing I wanted to ask about, though, is global vs. local. I see you
talk about globals, but in fact the variables in my subVI's were locals. I can
easily understand the behavior I observed accompanying the use of global
variables, But I guess the use of the word "local" stumped me.
Should I interpret "local" in LabVIEW's sense to mean "local to all instances
of this VI"? And global to mean "visible to all instances of this VI as well
as other VI's"?
-Jeff
Tim Price wrote:
> This facility is actually very useful, for instances where you want to
> encapsulate some code so that it can only run in one place at a time, i.e.
> global arrays that are written to in more than one place. T
his method can
> eradicate race conditions completely for example when used like this. There
> are multiple other uses as well.
>
> However, using a vi as a module of code, to run in more than one instance at
> a time simultaneously, re-entrant is the way to go. Just make sure you
> debug it first!!!
> Remember though, just because a vi may be re-eneterant, doesn't mean that
> everything inside is; sub-vi's, Globals etc. The classic one I've seen is
> where people think that a re-enterant vi is talking to it's own copy of any
> Globals used within it, i.e. counters etc., where in actual fact of course,
> they are all using the same Globals.
>
> Worth playing with a few examples to get familiar with it.
>
> Tim Price
Jeffrey W Percival, Senior Scientist and Associate Director
Space Astronomy Laboratory, University of Wisconsin - Madison
1150 University Ave, Madison, WI 53706 USA
608-262-8686 (fax 608-263-0361) [email protected] http://www.sal.wisc.edu/~jwp
Similar Messages
-
How to create a local partition index asign its storage tablespace
hi
i see the syntax about create local context index
quote:
Syntax for CONTEXT Indextype
Use this indextype to create an index on a text column. You query this index with the CONTAINS operator in the WHERE clause of a SELECT statement. This index requires manual synchronization after DML.
CREATE INDEX [schema.]index on [schema.]table(column) INDEXTYPE IS ctxsys.context [ONLINE]
LOCAL [(PARTITION [partition] [PARAMETERS('paramstring')]
[, PARTITION [partition] [PARAMETERS('paramstring')]])]
[PARAMETERS(paramstring)] [PARALLEL n] [UNUSABLE];
and i try the under code ,all failed.
SQL> create index html2_idx on HTML2(newsdescription) indextype is ctxsys.contex
t local (partition indx parameters('lexer my_lexer'),partition indx01 tablespace
users01 parameters('lexer my_lexer'),partition indx02 tablespace users02 param
eters('lexer my_lexer'),partition indx03 tablespace users03 parameters('lexer m
y_lexer') );
ERROR:ORA-29850
could anybody show some demo sql code creating partition context index asign its storage tablespace
thankstry:
create index html2_idx on HTML2(newsdescription) indextype is ctxsys.contex
t local (
partition indx parameters('lexer my_lexer'),
partition indx01 parameters('storage users01_stg lexer my_lexer'),
partition indx02 parameters('storage users02_stg lexer my_lexer'),
Create storage preferences users01, users02, .. with I, K, ... attributes for tablespace users01, users02, ...
Btw, ¿does anyone know whats the upper limit of partitions for a domain index? I've read in OTN they were 9999 but it crashes me (oracle 9.2.0.1) when I have 255... ¿has anyone tried this? -
10g: How to determine Local Partition Index Space UTILIZATION
I'm trying to determine how much space is actually utilized by different local partition indexes. Some are b-tree and some are bitmap. So far when I query dba_segments and dba_part_indexes I just see space available, not the space utilized.
Does anybody know a way to know the actual space utilized by a local partition index?Does anybody know a way to know the actual space utilized by a local partition index?SUM(BYTES) from dba_extents
SQL> desc dba_extents
Name Null? Type
OWNER VARCHAR2(30)
SEGMENT_NAME VARCHAR2(81)
PARTITION_NAME VARCHAR2(30)
SEGMENT_TYPE VARCHAR2(18)
TABLESPACE_NAME VARCHAR2(30)
EXTENT_ID NUMBER
FILE_ID NUMBER
BLOCK_ID NUMBER
BYTES NUMBER
BLOCKS NUMBER
RELATIVE_FNO NUMBER -
Creating Local partitioned index on Range-Partitioned table.
Hi All,
Database Version: Oracle 8i
OS Platform: Solaris
I need to create Local-Partitioned index on a column in Range-Partitioned table having 8 million records, is there any way to perform it in fastest way.
I think we can use Nologging, Parallel, Unrecoverable options.
But while considering Undo and Redo also mainly time required to perform this activity....Which is the best method ?
Please guide me to perform it in fastest way and also online !!!
-YasserYasserRACDBA wrote:
3. CREATE INDEX CSB_CLIENT_CODE ON CS_BILLING (CLIENT_CODE) LOCAL
NOLOGGING PARALLEL (DEGREE 14) online;
4. Analyze the table with cascade option.
Do you think this is the only method to perform operation in fastest way? As table contain 8 million records and its production database.Yasser,
if all partitions should go to the same tablespace then you don't need to specify it for each partition.
In addition you could use the "COMPUTE STATISTICS" clause then you don't need to analyze, if you want to do it only because of the added index.
If you want to do it separately, then analyze only the index. Of course, if you want to analyze the table, too, your approach is fine.
So this is how the statement could look like:
CREATE INDEX CSB_CLIENT_CODE ON CS_BILLING (CLIENT_CODE) TABLESPACE CS_BILLING LOCAL NOLOGGING PARALLEL (DEGREE 14) ONLINE COMPUTE STATISTICS;
If this operation exceeds particular time window....can i kill the process?...What worst will happen if i kill this process?Killing an ONLINE operation is a bit of a mess... You're already quite on the edge (parallel, online, possibly compute statistics) with this statement. The ONLINE operation creates an IOT table to record the changes to the underlying table during the build operation. All these things need to be cleaned up if the operation fails or the process dies/gets killed. This cleanup is supposed to be performed by the SMON process if I remember correctly. I remember that I once ran into trouble in 8i after such an operation failed, may be I got even an ORA-00600 when I tried to access the table afterwards.
It's not unlikely that your 8.1.7.2 makes your worries with this kind of statement, so be prepared.
How much time it may take? (Just to be on safer side)The time it takes to scan the whole table (if the information can't read from another index), the sorting operation, plus writing the segment, plus any wait time due to concurrent DML / locks, plus the time to process the table that holds the changes that were done to the table while building the index.
You can try to run an EXPLAIN PLAN on your create index statement which will give you a cost indication if you're using the cost based optimizer.
Please suggest me if any other way exists to perform in fastest way.Since you will need to sort 8 million rows, if you have sufficient memory you could bump up the SORT_AREA_SIZE for your session temporarily to sort as much as possible in RAM.
-- Use e.g. 100000000 to allow a 100M SORT_AREA_SIZE
ALTER SESSION SET SORT_AREA_SIZE = <something_large>;
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Function based local partitioned Index
Hi,
Is function based index possible on partitioned column?
E.g:
CREATE TABLE MYTABLE
MY_ID NUMBER(10) NOT NULL,
MY_DATETIME DATE NOT NULL,
MY_ACTIVITY_TYPE VARCHAR2(1) NOT NULL,
MY_CREATE_DATETIME DATE NOT NULL,
MY_BUSINESS_DATE DATE NOT NULL,
MY_EXP_PROCESS_DATE DATE NULL
TABLESPACE TABLESPACE_D
NOLOGGING
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE(INITIAL 128K
NEXT 4M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT)
NOPARALLEL
NOCACHE
PARTITION BY RANGE(MY_DATETIME)
(PARTITION MYTABLE_2006_JAN VALUES LESS THAN (TO_DATE('02-FEB-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_FEB VALUES LESS THAN (TO_DATE('02-MAR-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_MAR VALUES LESS THAN (TO_DATE('04-APR-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_APR VALUES LESS THAN (TO_DATE('02-MAY-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_MAY VALUES LESS THAN (TO_DATE('02-JUN-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_JUN VALUES LESS THAN (TO_DATE('04-JUL-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_JUL VALUES LESS THAN (TO_DATE('02-AUG-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_AUG VALUES LESS THAN (TO_DATE('04-SEP-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_SEP VALUES LESS THAN (TO_DATE('03-OCT-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_OCT VALUES LESS THAN (TO_DATE('02-NOV-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_NOV VALUES LESS THAN (TO_DATE('04-DEC-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_DEC VALUES LESS THAN (TO_DATE('02-JAN-2007','DD-MON-YYYY'))
NOLOGGING
CREATE INDEX IDX_MY_TABLLE_DATETIME
ON MYTABLE(MY_DATETIME,TO_NUMBER(TO_CHAR(MY_DATETIME,'YYYYMM')))
LOCAL
PARTITION MYTABLE_2006_JAN,
PARTITION MYTABLE_2006_FEB,
PARTITION MYTABLE_2006_MAR,
PARTITION MYTABLE_2006_APR,
PARTITION MYTABLE_2006_MAY,
PARTITION MYTABLE_2006_JUN,
PARTITION MYTABLE_2006_JUL,
PARTITION MYTABLE_2006_AUG,
PARTITION MYTABLE_2006_SEP,
PARTITION MYTABLE_2006_OCT,
PARTITION MYTABLE_2006_NOV,
PARTITION MYTABLE_2006_DEC
) PCTFREE 10
INITRANS 2
MAXTRANS 255
TABLESPACE TABLESPACE_I
STORAGE(INITIAL 128K
NEXT 4M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT)
NOLOGGING
NOPARALLEL
NOCOMPRESS
/Oracle allows me to create the above index(I am using 10g) but in the USER_INDEXES data dictionary, for the above index the STATUS value is N/A. I could able to query also and the explain plan shows this index but my concern is will there be any other performance problem with this type of index?
Regards,
MohanaHi,
Is function based index possible on partitioned column?
E.g:
CREATE TABLE MYTABLE
MY_ID NUMBER(10) NOT NULL,
MY_DATETIME DATE NOT NULL,
MY_ACTIVITY_TYPE VARCHAR2(1) NOT NULL,
MY_CREATE_DATETIME DATE NOT NULL,
MY_BUSINESS_DATE DATE NOT NULL,
MY_EXP_PROCESS_DATE DATE NULL
TABLESPACE TABLESPACE_D
NOLOGGING
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE(INITIAL 128K
NEXT 4M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT)
NOPARALLEL
NOCACHE
PARTITION BY RANGE(MY_DATETIME)
(PARTITION MYTABLE_2006_JAN VALUES LESS THAN (TO_DATE('02-FEB-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_FEB VALUES LESS THAN (TO_DATE('02-MAR-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_MAR VALUES LESS THAN (TO_DATE('04-APR-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_APR VALUES LESS THAN (TO_DATE('02-MAY-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_MAY VALUES LESS THAN (TO_DATE('02-JUN-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_JUN VALUES LESS THAN (TO_DATE('04-JUL-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_JUL VALUES LESS THAN (TO_DATE('02-AUG-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_AUG VALUES LESS THAN (TO_DATE('04-SEP-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_SEP VALUES LESS THAN (TO_DATE('03-OCT-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_OCT VALUES LESS THAN (TO_DATE('02-NOV-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_NOV VALUES LESS THAN (TO_DATE('04-DEC-2006','DD-MON-YYYY')),
PARTITION MYTABLE_2006_DEC VALUES LESS THAN (TO_DATE('02-JAN-2007','DD-MON-YYYY'))
NOLOGGING
CREATE INDEX IDX_MY_TABLLE_DATETIME
ON MYTABLE(MY_DATETIME,TO_NUMBER(TO_CHAR(MY_DATETIME,'YYYYMM')))
LOCAL
PARTITION MYTABLE_2006_JAN,
PARTITION MYTABLE_2006_FEB,
PARTITION MYTABLE_2006_MAR,
PARTITION MYTABLE_2006_APR,
PARTITION MYTABLE_2006_MAY,
PARTITION MYTABLE_2006_JUN,
PARTITION MYTABLE_2006_JUL,
PARTITION MYTABLE_2006_AUG,
PARTITION MYTABLE_2006_SEP,
PARTITION MYTABLE_2006_OCT,
PARTITION MYTABLE_2006_NOV,
PARTITION MYTABLE_2006_DEC
) PCTFREE 10
INITRANS 2
MAXTRANS 255
TABLESPACE TABLESPACE_I
STORAGE(INITIAL 128K
NEXT 4M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT)
NOLOGGING
NOPARALLEL
NOCOMPRESS
/Oracle allows me to create the above index(I am using 10g) but in the USER_INDEXES data dictionary, for the above index the STATUS value is N/A. I could able to query also and the explain plan shows this index but my concern is will there be any other performance problem with this type of index?
Regards,
Mohana -
How to simply create a locally partitioned index with a dedicated tablespac
Dears,
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biSuppose you have a range partitioned table t on date d with n partitions p1, p2,....pn
If you create a locally partitioned index using the following script
create index ind_loc on t(d) local;all the partitioned indexes will be created on the same default tablespace.
Is there a simple creation script (not that where we have to add each partition and each tablespace) to use in order to associate each partitioned index to a given tablespace?
Best Regards
Mohamed HouriSuppose you have a range partitioned table t on date d with n partitions p1, p2,....pn
If you create a locally partitioned index using the following script
create index ind_loc on t(d) local;all the partitioned indexes will be created on the same default tablespace.
Is there a simple creation script (not that where we have to add each partition and each tablespace) to use in order to associate each partitioned index to a given tablespace?
Hi Mohamed ,
AFAIK , there is no such script . If you want partition to be stored in different tablespaces, then you will have to specify partition name along with tablespace name in create index command.
Regards
Rajesh -
Estimation of Local Partitioned Bitmap Index size in Oracle
Its datawarehousing project and the we have around 20 partitioned dimensional tables . The requirement is to create local partitioned bitmap index on almost all columns of dimension tables excluding primary key columns as they are already indexed.We need to estimate the size of index partitionwise.
Please let me have if there is any ready piece of script which will help me in estimating size of bitmap local partitioned index.You may want to look into the DBMS_SPACE.CREATE_INDEX_COST procedure.
Usage Notes* The table on which the index is created must already exist.
* The computation of the index size depends on statistics gathered on the segment.
* It is imperative that the table must have been analyzed recently.
* In the absence of correct statistics, the results may be inaccurate, although the procedure will not raise any errors. -
Permissions on Local Partition
Hi everyone,
My client machines all have a local partition for the Media Department to use as a scratch disk. I've set the permissions so that anyone who isn't part of this depatment cannot read or write to this partition, the problem I have is when a user from another department logs in, they are granted RW permissions which seem to be over riding the original RO permissions I had set ? How do I ensure users do get this RW permission on the local partition when they log in ?
Thanks in Advance
BenSorry last line was meant to read : -
How do I ensure users do not get this RW permission on the local partition when they log in ?
Thanks -
I was wondering if anybody knew how to force a Service Object to be
partitioned onto the server without it being a DB service object or C
shared library when partitioning for a local run instead of running
distributed?
Greatly appreciate it.Hello,
The TechNet Wiki Forum is a place for the TechNet Wiki Community to engage, question, organize, debate, help, influence and foster the TechNet Wiki content, platform and Community.
Please note that this forum exists to discuss TechNet Wiki as a technology/application.
As it's off-topic here, I am moving the question to the
Where is the forum for... forum.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}}) -
ORA-01426 creating local partitioned intermedia index (URGENT)
We are trying to create a domain index on a daily partitioned table with Oracle 9.2.0.1. This table will have 365 partitions, one by day.
When creating the context index oracle dumps the next error:
ORA-29855: se ha producido un error en la ejecución de la rutina
ODCIINDEXCREATE
ORA-20000: Error de Oracle Text:
DRG-50857: oracle error in driddl.kglpurge
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drdmlv
ORA-01426: desbordamiento numérico
ORA-30576: error al cargar el diccionario de la Opción ConText
DRG-50610: internal error: kglpurge []
ORA-06512: en "CTXSYS.DRUE", línea 157
ORA-06512: en "CTXSYS.TEXTINDEXMETHODS", línea 186
According to Thechnical overview Oracle Text 9.0.1 the limit on the number of partitions of a context index is of 9999; but it crashes when it gets to 255 (we can see this by the $ tables it has written).
¿is this a bug, is there any patch for this? ¿do we have to split the table?"UNIQUENESS" has to be across the table. However, when you create a LOCAL Index, the index segment is only within that table Partition. How can Oracle guarantee Uniqueness ? Only if the Index also includes the Table Partition Key -- that way it knows that no two rows in the two partitions will have the same value on the Partition Keys. The additional columns then allow for uniqueness without Oracle having to "verify" values in other Table Partitions.
That is why a LOCALlly Partitioned UNIQUE Index must include the Table Partition Key columns. -
Problem exchanging local partition that includes context index
I am working on a problem where I exchange a table and indexes with a partition in another table. One of the indexes is a context index, local on the range partitioned table. After executing the alter table exchange command, the context index on the range partitioned table becomes unusable for some amount of time.
I get the following error.
ERROR at line 1:
ORA-20000: Oracle Text error:
DRG-10599: column is not indexed
The status of the index shows "INPROGRS". Is there a way to stop this error from occuring during the partition exchange? The other indexes swap without a problem, and given time, the context index becomes usuable again.. But to the user, any downtime would be bad.
Any ideas on avoiding this?
Thank you in advance...This is due to your use of INDEX_STEMS and the fact that certain linguistic features are disabled in 11.2.0.3.
Please see the support note 1354793.1 which will tell you what you need to do to get them re-enabled. -
Creating Primary key Index as Local Partitioned Index.
CREATE TABLE T1(
x NUMBER,
y NUMBER
)PARTITION BY LIST(x)
PARTITION P1 VALUES (1),
PARTITION P2 VALUES (2),
PARTITION Pmax VALUES (default)
ALTER TABLE T1 ADD CONSTRAINT T1_PK PRIMARY KEY(Y) LOCAL;
Error starting at line 1 in command:
ALTER TABLE T1 ADD CONSTRAINT T1_PK PRIMARY KEY(Y) LOCAL
Error report:
SQL Error: ORA-01735: invalid ALTER TABLE option
01735. 00000 - "invalid ALTER TABLE option"
*Cause:
*Action:
Can you please help me how to achieve this in Oracle 10g R2?LOCAL keyword is invalid with ALTER TABLEDepends:
SQL> create table t1 (x number, y number)
partition by list (x)
(partition p1
values (1),
partition p2
values (2),
partition pmax
values (default))
Table created.
SQL> alter table t1 add constraint t1_pk primary key(x, y) using index local
Table altered. -
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. -
HOW TO CREATE LOCAL INDEX ON BIG PARTITION TABLE
Dear All,
I have one big table 450GB stored on 9 partitions and same partitions I have created for the index. Now the problem is when i am trying to create local index it took one and half day and is still going on...
is there any shortest way to create local index on this table easily.
Database version is 11.2.0.1.0
INDEX SCRIPT IS
CREATE INDEX INDEX_SPACE0_IX_LOCAL ON FINANCE (END_TIME)
INITRANS 2 MAXTRANS
255
LOCAL ( PARTITION INDEX_SPACE01
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE01
PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
2147483645 BUFFER_POOL
DEFAULT), PARTITION INDEX_SPACE02
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE02 PCTFREE
5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
2147483645 BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE03
LOGGING
NOCOMPRESS
TABLESPACE
INDEX_SPACE03
PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
2147483645 BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE04
LOGGING
NOCOMPRESS
TABLESPACE
INDEX_SPACE04 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
1 MAXEXTENTS
2147483645 BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE05
LOGGING
NOCOMPRESS
TABLESPACE
INDEX_SPACE05 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE06
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE06 PCTFREE 5 INITRANS 2
MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL
DEFAULT),
PARTITION INDEX_SPACE07
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE07 PCTFREE
5 INITRANS 2
MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL
DEFAULT),
PARTITION INDEX_SPACE08
LOGGING
NOCOMPRESS
TABLESPACE INDEX_SPACE08 PCTFREE
5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS 1 MAXEXTENTS
2147483645
BUFFER_POOL DEFAULT),
PARTITION INDEX_SPACE09
LOGGING
NOCOMPRESS
TABLESPACE
INDEX_SPACE09 PCTFREE 5 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 1M MINEXTENTS
1 MAXEXTENTS 2147483645 BUFFER_POOL
DEFAULT))
NOPARALLEL;
Thanks in advance......
Thanks,
Edited by: sherkhan on Aug 24, 2011 3:36 AM
Edited by: sherkhan on Aug 24, 2011 3:49 AMHave you verified that 'n' Index partition segments have got created so far ? (they would apepar as TEMPORARY segments only till the full index creation is completed). Have you monitored the session statistics and waits and confirmed that it is not waiting on something horrible ?
A CREATE INDEX can well be NOLOGGING instead of LOGGING. It could also use PARALLEL but I always recommend setting it back to NOPARALLEL immediately after the CREATE is completed.
You can also "quickly" build an empty index and then gradually create (i.e. build) each partition
CREATE INDEX INDEX_SPACE0_IX_LOCAL ......... UNUSABLE ;
ALTER INDEX INDEX_SPACE0_IX_LOCAL REBUILD PARTITION PARTITION INDEX_SPACE01;
ALTER INDEX INDEX_SPACE0_IX_LOCAL REBUILD PARTITION PARTITION INDEX_SPACE02;
...Hemant K Chitale -
ADD PARTITION시 NEW LOCAL INDEX PARTITION에 관하여
제품 : ORACLE SERVER
작성날짜 : 2004-08-16
ADD PARTITION시 NEW LOCAL INDEX PARTITION에 관하여
==================================================
(※ Oracle Partitioning Option은 8~10g Standard Edition에서는 지원하지 않는다.)
개 요
=======
ALTER TABLE ADD PARTITION을 할 경우 table partition의 경우 table partition,
tablespace, physical storage attribute를 지정할 수 있으나,
local index partition의 경우 관련 syntax를 지원하지 않는다 (8.1.6 현재)
오라클은 자동으로 index partition, tablespace, physical storage attribute를 지정한다.
(ALTER TABLE SPLIT PARTITION도 마찬가지)
new index partition의 이름은 new table partition과 같은 이름이 할당되고,
tablespace, physical storage attribute는 local index에 지정된 default값이 사용되고,
local index에 지정된 default값이 없으면 user의 default tablespace가 사용된다.
그러므로 PARTITION 추가하여 사용하는 경우 index partition 관리에 주의가 요구된다.
다음은 ALTER TABLE ADD PARTITION한 이후에 index partition을 관리하는 예제이다.
예 제
=======
-- Create partition table --
CREATE TABLE tbl_emp (
empno NUMBER,
ename VARCHAR2(20),
job VARCHAR2(20)
PARTITION BY RANGE ( empno ) (
PARTITION pt_tbl_emp01 VALUES LESS THAN( 1000 ) TABLESPACE data_emp01,
PARTITION pt_tbl_emp02 VALUES LESS THAN( 2000 ) TABLESPACE data_emp02,
PARTITION pt_tbl_emp03 VALUES LESS THAN( 3000 ) TABLESPACE data_emp03
-- Create local index --
CREATE INDEX idx_emp ON tbl_emp( empno )
TABLESPACE users --> 여기서 local index default tablespace 지정
LOCAL (
PARTITION pt_idx_emp01 TABLESPACE indx_emp01,
PARTITION pt_idx_emp02 TABLESPACE indx_emp02,
PARTITION pt_idx_emp03 TABLESPACE indx_emp03
-- PK 설정 --
ALTER TABLE tbl_emp ADD CONSTRAINT pk_emp PRIMARY KEY ( empno );
-- Local Index를 PK index로 사용함을 확인 --
SELECT index_name FROM user_indexes WHERE table_name = 'TBL_EMP';
INDEX_NAME
IDX_EMP
DROP INDEX idx_emp
ERROR at line 1:
ORA-02429: cannot drop index used for enforcement of unique/primary key
-- Add partition --
ALTER TABLE tbl_emp
ADD PARTITION pt_tbl_emp04 VALUES LESS THAN( 4000 )
TABLESPACE data_emp04;
-- 추가된 Local index partition의 이름, Tablespace를 확인한다 --
SELECT partition_name, tablespace_name, status
FROM user_ind_partitions
ORDER BY 1;
PARTITION_NAME TABLESPACE_NAME STATUS
PT_IDX_EMP01 INDX_EMP01 USABLE
PT_IDX_EMP02 INDX_EMP02 USABLE
PT_IDX_EMP03 INDX_EMP03 USABLE
PT_TBL_EMP04 USERS USABLE
-- Tablespace는 local index의 default tablespace에 생긴다 --
SELECT index_name, def_tablespace_name
FROM user_part_indexes;
INDEX_NAME DEF_TABLESPACE_NAME
IDX_EMP USERS
--<< Local index partition name 변경 >>--
ALTER INDEX idx_emp
RENAME PARTITION pt_tbl_emp04 TO pt_idx_emp04;
--<< Local index tablespace 변경 >>--
ALTER INDEX idx_emp
REBUILD PARTITION pt_idx_emp04 TABLESPACE indx_emp04;
SELECT partition_name, tablespace_name, status
FROM user_ind_partitions
ORDER BY 1;
-- 변경된 Local index partition의 이름, Tablespace를 확인한다 --
PARTITION_NAME TABLESPACE_NAME STATUS
PT_IDX_EMP01 INDX_EMP01 USABLE
PT_IDX_EMP02 INDX_EMP02 USABLE
PT_IDX_EMP03 INDX_EMP03 USABLE
PT_IDX_EMP04 INDX_EMP04 USABLE
* 다음과 같이 local index의 default tablespace를 변경할 수도 있다.
alter index <indexname>
modify default attributes tablespace <new tablespace name>;>
1. If i drop one partition of a table why all the local indexes(year_1998 ... year_2000) get dropped but year_idx remains in database? I couldn't find index in dba_part_indexes view but i could find only year_idx line in dba_indexes view.
>
After dropping a partition, the row in DBA_PART_INDEXES still exists, so I'm unsure why it does not appear on your system. The index however does not appear in the DBA_INDEXES view before or after the drop partition:
for example
SQL> select owner, index_name from dba_part_indexes where
2 index_name = 'YEAR_IDX';
OWNER INDEX_NAME
APPS YEAR_IDX
SQL> alter table all_facts drop partition year_1999;
Table altered.
SQL> select owner, index_name from dba_part_indexes where
2 index_name = 'YEAR_IDX';
OWNER INDEX_NAME
APPS YEAR_IDX
SQL> select owner, index_name from dba_indexes
2 where index_name = 'YEAR_INDEX';
no rows selected
Maybe you are looking for
-
SAP BPC 7.5 NW - BPF Error
Hi all, I have created a BPF template in BPC 7.5 NW. When I click on a step, an input schdule should open up in Interface for Excel, but this does not happen. No action is excuted. Whereas the same BPF template in another system (in the same domain)
-
Print problem under Windos 7 pro
What is the correct procedure to print a partial Web page (par of the page selectioned wiht mouse) If is do a selection (highlighted in blue), and if I try to print on my default printer, the option "selection" in the print menu is not available ! pr
-
Another simple day at the office..... What was the case. A colleague approached me telling that he had two similar queries. One of them returning data, the other not. The "simplified" version of the two queries looked like: SELECT col1 FROM tab1 WH
-
E50 Web Browser & Red Button behavior
Is there anyway to change the behavior of the Red Button (End Call) when in the web browser on the E50? Currently, if the red button is accidentally hit it instantly closes the web browser and all typing and web pages are closed and lost. This happen
-
Can't add to library "the streaming server cannot accept
Had trouble w/ library; uninstall - reinstall Apple for WinXP x86... kep getting this Error message when trying to import Library from a Folder: c:\seagate FreeAgent\Jukebox Upon initiate... the screen blips to the Internet Music 'genre' and immediat