How to create index on specific partition table?
Hi Experts,
we created 4 partitions on table .
Table Name : test
partitions : Test_prt1
Test_prt2
Test_prt3
Test_prt4
Our requiremnt create the index on specific partition (ex : Test_prt2) only.
Creating Partitioned Tables and Indexes
http://technet.microsoft.com/en-us/library/ms187526(v=sql.105).aspx
you can create a aligned index, the index will be spread over the filegroups
Create NonClustered Index IX_orders_aligned
On dbo.orders(order_id)
On test_monthlyDateRange_ps(orderDate);
OR
Unaligned parition, you can create index on any filegroups
Create NonClustered Index IX_orders_unpartitioned
On dbo.orders(order_id)
On [Test_prt2_FileGroup];
For more information refer the below link
http://sqlfool.com/2008/12/indexing-for-partitioned-tables/
Or
You can try Creating a filtered index (I've not tried it though)
http://www.mssqltips.com/sqlservertip/1785/sql-server-filtered-indexes-what-they-are-how-to-use-and-performance-advantages/
--Prashanth
Similar Messages
-
Creating index on large partitioned table
Is anyone aware of a method for telling how far along is the creation of an index on a large partitioned table? The statement I am executing is like this:
CREATE INDEX "owner"."new_index"
ON "owner"."mytable"(col_1, col_2, col_3, col_4)
PARALLEL 8 NOLOGGING ONLINE LOCAL;
This is a two-node RAC system on Windows 2003 x64, using ASM. There are more than 500,000,000 rows in the table, and I'd estimate that each row is about 600-1000 bytes in size.
Thank you.you can know the progress from v$session_longops.
select
substr(SID ||','||SERIAL# ,1,8) "sid,srl#",
substr(OPNAME ||'>'||TARGET,1,50) op_target,
substr(trunc(SOFAR/TOTALWORK*100)||'%',1,5) progress,
TIME_REMAINING rem,
ELAPSED_SECONDS elapsed
from v$session_longops
where SOFAR!=TOTALWORK
order by sid;
hth -
How to create index on Global Temporary Table?
Hi,
Can i create index with storage parameters on global temporary table? If possible, how?
ThanksYes. You can create an index on a global temporary table (GTT) with the regular 'CREATE INDEX' statement.
Not sure though if you are allowed to locate it in a specific tablespace. Why would you want to do that anyway?
My guess is, like the GTT, indexes on GTT's also default to the temporary tablespace. -
BUG ? Create index on a partitioned table drops the complete table !
Hi ...
now i had twice the problem when i tried to create a local index (with 2 fields) on a partitioned table .
I set initrans to 1 and maxtrans to 255 (i know - initrans has to be at least 2).
I got an error - and the table (including the data) was gone ... :-((
Has anybody the same behavior and is it a bug ??
ChristianSee 1.5 Bad bug when creating index fails.
Have fun,
K. -
How to create index for Telecom large table
Hi ,
I'm working on DB 10G on REHL 5 for telecom company with more than 1 million recorded per day , we need to speed the query result ,
we know there are many types of the INDEX and I'm need a professional advice to create a suitable one ,
many of our queries depend on the MSID ( the MAC address of the Modem ) column ,
Name Null Type
STREAMNUMBER NUMBER(9)
MSID VARCHAR2(20)
USERNAME VARCHAR2(20)
DOMAIN VARCHAR2(20)
USERIP VARCHAR2(16)
CORRELATION_ID VARCHAR2(64)
ACCOUNTREASON NUMBER(3)
STARTTIME VARCHAR2(14)
PRIORTIME VARCHAR2(14)
CURTIME VARCHAR2(14)
SESSIONTIME NUMBER(9)
SESSIONVOLUME NUMBER(9)
.please any help ,really i have 3 queries for the subscriber activity like (usage details , the date of bundle start the the total of the download , he's working out of bundle or not )
and any of the subscribers can check those queries at any time thorw web ,
select nvl(min(substr(a.starttime,1,8)),0) Service_Start_Time, nvl(sum(a.sessionvolume),0) Total_Traffic_KB
FROM aaa_bill a
where msid='84A8E46E929D'
and starttime >=(select max(fee) FROM aaa_bill
where msid='84A8E46E929D' and accountreason=5);and the expected result is
service_start_date totoal_traffic_KB
20120225 440554the MSIDs examples
(84A8E46E7F43,
84A8E46E7A82,
84A8E46E7C84,
84A8E46E7CBF,
also i have this query ,
select
substr(nvl(
(select nvl(starttime,'0') as starttime
from (
select nvl(starttime,0) starttime,sum(sessionvolume) over(partition by msid order by starttime) sum1
from aaa_bill
where msid='84A8E46E90BC' and starttime >=(select max(fee) FROM aaa_bill
where msid='84A8E46E90BC' and accountreason=5))
where sum1>=44987000
and rownum<2)
,0),1,8) Reached_45GB
from dual;and this one ,
select min(to_char(to_date(starttime,'yyyymmddhh24miss'),'yyyy-mm-dd hh24:mi:ss')) "Accounting Start Time",
max(to_char(to_date(curtime,'yyyymmddhh24miss'),'yyyy-mm-dd hh24:mi:ss')) "Accounting Stop Time",sum(sessiontime) Duration1,
TO_CHAR (TRUNC (SYSDATE) + NUMTODSINTERVAL (sum(sessiontime), 'second'),'hh24:mi:ss') hr,
sum(sessionvolume) Traffic
from aaa_bill
where msid='84A8E46E78EF'
and starttime >=(select max(fee) FROM aaa_bill
where msid='84A8E46E78EF' and accountreason=5)
group by correlation_id
order by min(starttime); -
Creating a bit map index on a partitioned table
Dear friends,
I am trying to create a bitmap index on a partitioned table but am receiving the following ORA error. Can you please let me know on how to create a local bit map index as the message suggests?
ERROR at line 1:
ORA-25122: Only LOCAL bitmap indexes are permitted on partitioned tables
Trying to use the keyword local in front leads to wrong syntax.
Thanks in advance !!
SomnathORA-25122 Only LOCAL bitmap indexes are permitted on partitioned tables
Cause: An attempt was made to create a global bitmap index on a partitioned table.
Action: Create a local bitmap index instead
Example of a Local Index Creation
CREATE INDEX employees_local_idx ON employees (employee_id) LOCAL;
Example is about btree and I think it will work for bitmap also. -
How to create index on XMLTYPE ordered collection table?
I am using Oracle 11.2.0.2.
Essentially, my XML documents have a 3-level hierarchy:
event
+---action [1:n]
+---- param [1:n]
I am trying to create indexes on ordered collection tables, but can not get the syntax right...
I have created a table with an object-relational XMLType column:
CREATE TABLE T_C_RMP_MNTRNG_XML_FULL_IL4 (
MESSAGE_ID NUMBER(22,0) NOT NULL ENABLE,
XML_EVAL_ID NUMBER(22,0),
VIN7 VARCHAR2(7 BYTE),
FLEET_ID VARCHAR2(50 BYTE),
CSC_SW_VERSION VARCHAR2(100 BYTE),
RECEIVED DATE,
XML_CONTENT SYS.XMLTYPE ,
DWH_LM_TS_UTC DATE NOT NULL ENABLE,
CONSTRAINT PK_C_RMP_MNTRNG_XML_FULL_IL4 PRIMARY KEY (MESSAGE_ID)
) NOLOGGING TABLESPACE CATALOG
VARRAY "XML_CONTENT"."XMLDATA"."action" STORE AS TABLE "T_OR_MON_ACTION" (
NOLOGGING TABLESPACE "CATALOG"
VARRAY "param" STORE AS TABLE "T_OR_MON_ACTION_PARAM" (
NOLOGGING TABLESPACE "CATALOG"
) RETURN AS LOCATOR
) RETURN AS LOCATOR
XMLTYPE XML_CONTENT STORE AS OBJECT RELATIONAL XMLSCHEMA "http://mydomain.com/cs.xsd" ELEMENT "monitoring";
I am running the following SELECT:
SELECT EVENT_ID, ACTION_SUB_ID, MESSAGE_ID, ACTION_TYPE, UNIXTS_TO_DATE(ACTION_TIMESTAMP) ACTION_TIMESTAMP
FROM T_C_RMP_MNTRNG_XML_FULL_IL4,
XMLTABLE(
'for $i1 in /monitoring ,
$i2 in $i1/action
return element r {
$i1/eventId,
$i2
PASSING XML_CONTENT COLUMNS
EVENT_ID VARCHAR(40) PATH 'eventId',
ACTION_SUB_ID INTEGER PATH 'action/actionSubId',
ACTION_TYPE VARCHAR2(100) PATH 'action/type',
ACTION_TIMESTAMP NUMBER(13,0) PATH 'action/time'
) T2
WHERE (
EVENT_ID IS NOT NULL AND ACTION_SUB_ID IS NOT NULL
The explain plan looks like this (sorry, don't know how to get this formatted any "eye-friendlier"):
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1609K| 6316M| | 6110K (1)| 20:22:11 |
|* 1 | HASH JOIN | | 1609K| 6316M| 111M| 6110K (1)| 20:22:11 |
| 2 | TABLE ACCESS FULL| T_C_RMP_MNTRNG_XML_FULL_IL4 | 582K| 104M| | 5241 (1)| 00:01:03 |
|* 3 | TABLE ACCESS FULL| T_OR_MON_ACTION | 32M| 117G| | 105K (2)| 00:21:08 |
Predicate Information (identified by operation id):
1 - access("NESTED_TABLE_ID"="T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC0001300014$")
filter(CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(SYS_XQEXTRACT(XMLCONCAT(SYS_XMLGEN("T_C_RMP_MNTRN
G_XML_FULL_IL4"."SYS_NC00017$",NULL,SYS_XMLCONV("T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC00012$",0,32,
'EC1EEF23FD023A27E04032A06D930A8D',3,3783,1)),SYS_MAKEXML('EC1EEF23FD023A27E04032A06D930A8D',3780,
"T_C_RMP_MNTRNG_XML_FULL_IL4"."SYS_NC00008$","SYS_ALIAS_0"."SYS_NC_ROWINFO$")),'/eventId',NULL),0,
0,20971520,0),50,1,2) AS VARCHAR(40) ) IS NOT NULL)
3 - filter(CAST(TO_NUMBER(TO_CHAR("SYS_ALIAS_0"."actionSubId")) AS INTEGER ) IS NOT NULL)
Note
- dynamic sampling used for this statement (level=2)
- Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)
The XML schema looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:storeVarrayAsTable="true" oraxdb:flags="2105639" oraxdb:schemaURL="http://mydomain.com/cs.xsd" oraxdb:schemaOwner="MYUSER" oraxdb:numProps="23">
<xs:element name="monitoring" oraxdb:propNumber="3785" oraxdb:global="true" oraxdb:SQLName="monitoring" oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="monitoring757_TAB" oraxdb:defaultTableSchema="MYUSER">
<xs:complexType oraxdb:SQLType="monitoring755_T" oraxdb:SQLSchema="MYUSER">
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="action" oraxdb:propNumber="3780" oraxdb:global="false" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="action756_COLL" oraxdb:SQLCollSchema="MYUSER"/>
<xs:element ref="reservationType" oraxdb:propNumber="3781" oraxdb:global="false" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="softwareVersion" oraxdb:propNumber="3782" oraxdb:global="false" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="eventId" oraxdb:propNumber="3783" oraxdb:global="false" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="vin" oraxdb:propNumber="3784" oraxdb:global="false" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="action" oraxdb:propNumber="3790" oraxdb:global="true" oraxdb:SQLName="action" oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="action754_TAB" oraxdb:defaultTableSchema="MYUSER">
<xs:complexType oraxdb:SQLType="action752_T" oraxdb:SQLSchema="MYUSER">
<xs:sequence>
<xs:element ref="type" oraxdb:propNumber="3786" oraxdb:global="false" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element maxOccurs="unbounded" ref="param" oraxdb:propNumber="3787" oraxdb:global="false" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false" oraxdb:SQLCollType="param753_COLL" oraxdb:SQLCollSchema="MYUSER"/>
<xs:element ref="actionSubId" oraxdb:propNumber="3788" oraxdb:global="false" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="time" oraxdb:propNumber="3789" oraxdb:global="false" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="type" type="xs:string" oraxdb:propNumber="3791" oraxdb:global="true" oraxdb:SQLName="type" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="type751_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="param" oraxdb:propNumber="3794" oraxdb:global="true" oraxdb:SQLName="param" oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER" oraxdb:memType="258" oraxdb:defaultTable="param750_TAB" oraxdb:defaultTableSchema="MYUSER">
<xs:complexType oraxdb:SQLType="param749_T" oraxdb:SQLSchema="MYUSER">
<xs:sequence>
<xs:element minOccurs="0" ref="value" oraxdb:propNumber="3792" oraxdb:global="false" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
<xs:element ref="key" oraxdb:propNumber="3793" oraxdb:global="false" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:MemInline="false" oraxdb:SQLInline="true" oraxdb:JavaInline="false"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="value" type="xs:string" oraxdb:propNumber="3795" oraxdb:global="true" oraxdb:SQLName="value" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="value748_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="key" type="xs:string" oraxdb:propNumber="3796" oraxdb:global="true" oraxdb:SQLName="key" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="key747_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="actionSubId" type="xs:integer" oraxdb:propNumber="3797" oraxdb:global="true" oraxdb:SQLName="actionSubId" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="actionSubId746_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="time" type="xs:integer" oraxdb:propNumber="3798" oraxdb:global="true" oraxdb:SQLName="time" oraxdb:SQLType="NUMBER" oraxdb:memType="2" oraxdb:defaultTable="time745_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="reservationType" type="xs:string" oraxdb:propNumber="3799" oraxdb:global="true" oraxdb:SQLName="reservationType" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="reservationType744_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="softwareVersion" type="xs:string" oraxdb:propNumber="3800" oraxdb:global="true" oraxdb:SQLName="softwareVersion" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="softwareVersion743_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="eventId" type="xs:string" oraxdb:propNumber="3801" oraxdb:global="true" oraxdb:SQLName="eventId" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="eventId742_TAB" oraxdb:defaultTableSchema="MYUSER"/>
<xs:element name="vin" type="xs:string" oraxdb:propNumber="3802" oraxdb:global="true" oraxdb:SQLName="vin" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1" oraxdb:defaultTable="vin741_TAB" oraxdb:defaultTableSchema="MYUSER"/>
</xs:schema>
How can I create an index on these ordered collection tables in order to improve performance?
I found the example at http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb_rewrite.htm#ADXDB5859 but am not able to apply it to this particular case...
Thank you in advance...If the schema is not annotated then xs:integer and xs:string are mapped to NUMBER and VARCHAR2(4000) datatypes, so you have to use those in your query in order to avoid unnecessary typecasting operations.
You should also use chained XMLTABLEs when accessing a parent/child relationship instead of a FLWOR expression, otherwise the CBO may not rewrite the XQuery correctly (maybe it's fixed in the latest release).
If you make those changes, the plan should show cleaner predicates :
SQL> SELECT EVENT_ID, ACTION_SUB_ID, MESSAGE_ID, ACTION_TYPE, ACTION_TIMESTAMP
2 FROM test_table,
3 XMLTABLE('/monitoring'
4 PASSING XML_CONTENT COLUMNS
5 EVENT_ID VARCHAR2(4000) PATH 'eventId',
6 actions XMLTYPE PATH 'action'
7 ) T1,
8 XMLTABLE('/action'
9 PASSING actions COLUMNS
10 ACTION_SUB_ID NUMBER PATH 'actionSubId',
11 ACTION_TYPE VARCHAR2(4000) PATH 'type',
12 ACTION_TIMESTAMP NUMBER PATH 'time'
13 ) T2
14 WHERE EVENT_ID IS NOT NULL
15 AND ACTION_SUB_ID IS NOT NULL
16 ;
Execution Plan
Plan hash value: 1763884463
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 109 | 220K| 6 (17)| 00:00:01 |
| 1 | MERGE JOIN | | 109 | 220K| 6 (17)| 00:00:01 |
|* 2 | TABLE ACCESS BY INDEX ROWID| TEST_TABLE | 11 | 352 | 2 (0)| 00:00:01 |
| 3 | INDEX FULL SCAN | SYS_C007567 | 11 | | 1 (0)| 00:00:01 |
|* 4 | SORT JOIN | | 109 | 216K| 4 (25)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | T_OR_MON_ACTION | 109 | 216K| 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("TEST_TABLE"."SYS_NC00012$" IS NOT NULL)
4 - access("SYS_ALIAS_0"."NESTED_TABLE_ID"="TEST_TABLE"."SYS_NC0000800009$")
filter("SYS_ALIAS_0"."NESTED_TABLE_ID"="TEST_TABLE"."SYS_NC0000800009$")
5 - filter("SYS_ALIAS_0"."actionSubId" IS NOT NULL)
Note
- dynamic sampling used for this statement (level=2)
Now, if still necessary, it all boils down to choosing a technique to index NULL values :
- composite index with a not null or constant column
- FBI
- bitmap
Pick one that best fits your data, selectivity and activity on the tables. -
How to create indexes using CREATE TABLE statement
Hi,
Can anyone please tell me how to create indexes using CREATE TABLE staement? This point is part SQL Expert exam (1Z0-047) and please guide me to use which books for this particular exam.
Thanks in advance.Can anyone please tell me how to create indexes using CREATE TABLE staement?e.g. creating a primary key or a unique constraint will generate indexes along with the create table syntax:
SQL> create table t (a integer primary key, b integer unique)
Table created.
SQL> select index_name, index_type, uniqueness
from user_indexes
where table_name = 'T'
INDEX_NAME INDEX_TYPE UNIQUENES
SYS_C0016575 NORMAL UNIQUE
SYS_C0016574 NORMAL UNIQUE
2 rows selected. -
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. -
Non-Partitioned Global Index on Range-Partitioned Table.
Hi All,
Is it possible to create Non-Partitioned Global Index on Range-Partitioned Table?
We have 4 indexes on CS_BILLING range-partitioned table, in which one is CBS_CLIENT_CODE(*local partitioned index*) and others are unknown types of index to me??
Means other 3 indexes are what type indexes ...either non-partitioned global index OR non-partitioned normal index??
Also if we create index as :(create index i_name on t_name(c_name)) By default it will create Global index. Please correct me......
Please help me in identifying other 3 indexes types by referring below ouputs!!!
select INDEX_NAME,TABLE_NAME,PARTITIONING_TYPE,LOCALITY from dba_part_indexes where TABLE_NAME='CS_BILLING';
INDEX_NAME TABLE_NAME PARTITI LOCALI
CSB_CLIENT_CODE CS_BILLING RANGE LOCAL
select index_name,index_type,table_name,table_type,PARTITIONED from dba_indexes where table_name='CS_BILLING';
INDEX_NAME INDEX_TYPE TABLE_NAME TABLE_TYPE PAR
CSB_CREATE_DATE NORMAL CS_BILLING TABLE NO
CSB_SUBMIT_ORDER NORMAL CS_BILLING TABLE NO
CSB_CLIENT_CODE NORMAL CS_BILLING TABLE YES
CSB_ORDER_NBR NORMAL CS_BILLING TABLE NO
select INDEX_OWNER,INDEX_NAME,TABLE_NAME,COLUMN_NAME from dba_ind_columns where TABLE_NAME='CS_BILLING';
INDEX_OWNER INDEX_NAME TABLE_NAME COLUMN_NAME
RPADMIN CSB_CREATE_DATE CS_BILLING CREATE_DATE
RPADMIN CSB_SUBMIT_ORDER CS_BILLING SUBMIT_TO_INVOICE
RPADMIN CSB_SUBMIT_ORDER CS_BILLING ORDER_NBR
RPADMIN CSB_CLIENT_CODE CS_BILLING CLIENT_CODE
RPADMIN CSB_ORDER_NBR CS_BILLING ORDER_NBR
select dip.index_name, dpi.locality, dip.partition_name, dip.status
from dba_part_indexes dpi, dba_ind_partitions dip
where dpi.table_name ='CS_BILLING'
and dpi.index_name = dip.index_name;
INDEX_NAME LOCALI PARTITION_NAME STATUS
CSB_CLIENT_CODE LOCAL CSB_2006_4Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2006_3Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2007_1Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2007_2Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2007_3Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2007_4Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2008_1Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2008_2Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2008_3Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2008_4Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2009_1Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2009_2Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2009_3Q USABLE
CSB_CLIENT_CODE LOCAL CSB_2009_4Q USABLE
select * from dba_part_indexes
where table_name ='CS_BILLING'
and locality = 'GLOBAL';
no rows selected
-Yasser
Edited by: YasserRACDBA on Mar 5, 2009 11:45 PMYaseer,
Is it possible to create Non-Partitioned and Global Index on Range-Partitioned Table?
Yes
We have 4 indexes on CS_BILLING range-partitioned table, in which one is CBS_CLIENT_CODE(*local partitioned index*) and others are unknown types of index to me??
Means other 3 indexes are what type indexes ...either non-partitioned global index OR non-partitioned normal index??
You got local index and 3 non-partitioned "NORMAL" b-tree tyep indexes
Also if we create index as :(create index i_name on t_name(c_name)) By default it will create Global index. Please correct me......
Above staement will create non-partitioned index
Here is an example of creating global partitioned indexes
CREATE INDEX month_ix ON sales(sales_month)
GLOBAL PARTITION BY RANGE(sales_month)
(PARTITION pm1_ix VALUES LESS THAN (2)
PARTITION pm2_ix VALUES LESS THAN (3)
PARTITION pm3_ix VALUES LESS THAN (4)
PARTITION pm12_ix VALUES LESS THAN (MAXVALUE));Regards -
How to create indexes on ODS ?
Hello friends ,
Need some help .
Could any one please let me know how to create indexes on ODS ?
How Indexes are useful on ODS ?
Thanks in advance
RegardsDear Akshay,
Below is the information about indexes and there creation for ODS.
You can search a table for data records that satisfy certain search criteria faster using an index.
An index can be considered a copy of a database table that has been reduced to certain fields. This copy is always in sorted form. Sorting provides faster access to the data records of the table, for example using a binary search. The index also contains a pointer to the corresponding record of the actual table so that the fields not contained in the index can also be read.
The primary index is distinguished from the secondary indexes of a table. The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
You can also create further indexes on a table in the ABAP Dictionary. These are called secondary indexes.Under Indexes, you can create secondary indexes by using the context menu in order to improve the load and query performance of the ODS object This is necessary if the table is frequently accessed in a way that does not take advantage of the sorting of the primary index for the access.
The database system sometimes does not use a suitable index for a selection, even if there is one. The index used depends on the optimizer used for the database system. You should therefore check if the index you created is also used for the selection (see How to Check if an Index is Used).).
Creating an additional index could also have side effects on the performance. This is because an index that was used successfully for selection might not be used any longer by the optimizer if the optimizer estimates (sometimes incorrectly) that the newly created index is more selective.
The indexes on a table should therefore be as disjunct as possible, that is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.
Leaving content frame.
With Regards,
Prafulla Singh -
How to create an arrow in a table
How to create an arrow in a table in numbers.
If you have plus or minus numbers, I want to know a green arrow on the increase is positively or a red arrow if it is negative numberMaybe something like this?
-
How to create t-code for a table and how to create transaction variant???
Hi,
I have created a custom table zsark.
Now my requirement is : I have to create a transaction variant zsark_var for sm30 and table zsark. I have to disable the output of the first screen. I have to assign the transaction variant to the transaction code of table zsark.
Now,
1. how to create transaction code to a table. Can any one give me the
staps??
2. how to create transaction variant for the above requirement???
Thanks & Regards,
SarkarHi
1 Goto SE93 transaction
2 Choose 5th option Transaction with parameters
3 Give transaction : SM30, Check Skip Initial Screen Press Enter
4 Goto Bottom left corner, click F4 select viewname, on right hand side give table name
5 Press one more time F4, choose update , mark it X on right side.
6 save the transaction.
Thanks
sandeep
reward if helpful -
How to find out the Non Partitioned Tables used 2Gb on oracle
Hi team
how to find out the Non Partitioned Tables used > 2Gb on oracle where not is sys & system
regardsheres 1 I made earlier
set pagesize 999
set linesize 132
col owner format a25
col segment_name format a60
select owner,segment_name,segment_type,(bytes/1024/1024)"MB size"
from dba_segments
where owner not in ('SYS','SYSTEM','XDB','MDSYS','SYSMAN') -- edit for taste
and segment_type = 'TABLE'
having (bytes/1024/1024) > 2000
group by bytes, segment_Type, segment_name, owner
order by 4 asc -
How to create index on a xmltype column stored as CLOB
actually i have two problems.
i uploaded this schemaA.xsd file into xmldb repository without problems. registration also went ok.
BEGIN
DBMS_XMLSCHEMA.registerSchema(
schemaURL => 'http://xmlns.example.com/xdb/documentation/schemaA.xsd'
,schemaDoc => sys.UriFactory.getUri('/home/dev/schemaA.xsd')
,local => TRUE
,genBean => false
,genTypes => TRUE
,genTables => false
,enableHierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
END;
then i run this:
create table pf_table_a(
id VARCHAR2(100) primary key,
xsd VARCHAR2(3000),
xml_document XMLType
) XMLTYPE COLUMN xml_document
STORE AS CLOB
XMLSCHEMA "http://xmlns.example.com/xdb/documentation/schemaA.xsd"
ELEMENT "order";
and got this error:
SQL> @d:\usr\dev\perftest\create_tables.sql
Table created.
create table pf_table_a(
ERROR at line 1:
ORA-00955: name is already used by an existing object
anyway the table was created. so i went on to create indexes.
SQL> create index pf_a_index on pf_table_a(extractValue(OBJECT_VALUE, '/order@or
derNo'));
create index pf_a_index on pf_table_a(extractValue(OBJECT_VALUE, '/order@orderNo
ERROR at line 1:
ORA-04063: table "BAUSER1.PF_TABLE_A" has errors
this of course is wrong. because the command is for creating index of a XMLTYPE table. no a column. but what is the correct command? thanks.
jack.actually i have two problems.
i uploaded this schemaA.xsd file into xmldb repository without problems. registration also went ok.
BEGIN
DBMS_XMLSCHEMA.registerSchema(
schemaURL => 'http://xmlns.example.com/xdb/documentation/schemaA.xsd'
,schemaDoc => sys.UriFactory.getUri('/home/dev/schemaA.xsd')
,local => TRUE
,genBean => false
,genTypes => TRUE
,genTables => false
,enableHierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
END;
then i run this:
create table pf_table_a(
id VARCHAR2(100) primary key,
xsd VARCHAR2(3000),
xml_document XMLType
) XMLTYPE COLUMN xml_document
STORE AS CLOB
XMLSCHEMA "http://xmlns.example.com/xdb/documentation/schemaA.xsd"
ELEMENT "order";
and got this error:
SQL> @d:\usr\dev\perftest\create_tables.sql
Table created.
create table pf_table_a(
ERROR at line 1:
ORA-00955: name is already used by an existing object
anyway the table was created. so i went on to create indexes.
SQL> create index pf_a_index on pf_table_a(extractValue(OBJECT_VALUE, '/order@or
derNo'));
create index pf_a_index on pf_table_a(extractValue(OBJECT_VALUE, '/order@orderNo
ERROR at line 1:
ORA-04063: table "BAUSER1.PF_TABLE_A" has errors
this of course is wrong. because the command is for creating index of a XMLTYPE table. no a column. but what is the correct command? thanks.
jack.
Maybe you are looking for
-
Opening *.dwg file in 11.5.10.2
hi all, Good day..am using IE version 7 ...when i open a document in 11.5.10.2 which has extension as *.dwg it doesnt open...is there any profile options to be set ? thanks, baskar.l
-
Reduce file size makes documents much larger.
In my new Acrobat 10.1.6, "reduce file size" and "optimize" keep making the document much, much larger. Reduce file size even took a document previously at 3.3 mb and turned it into 24 mb. So I took the same document and went back to my previous Acro
-
AIA PIPs for BRM(Order to bill and agent assited billing care)
Hi, I have installed AIA11g FP and SOA11g on Weblogic 10. Now I would like to install PIPs for oracle billing and revenue management(Order to bill). I can only find AIA 2.5 release which is not compatible with weblogic 10. Could any one please let me
-
Hi All I am working on a project that uses SAP XI as middleware. XI reads flat files , converts them into idocs and posts them to SAP system. The inbound functions are designed to handle one idoc at a time whereas SAP XI is sending all idocs created
-
What does the error from my Apple Hardware Test mean?
I was doing some maintenance on my iMac G5 (Ambient Light Sensor) this past week and found that my Video RAM might be bad. My first clue was that when I used the 'option' key on boot, one of the resulting screens was covered with vertical lines of ab