Create indexes with NOLOGGING option
HelloCan you please provide solution on the following scenario?
If I create indexes with NOLOGGING Tablespace that is created with the LOGGING option, option can you please let me know what are the effects on the database?
If I create indexes using NOLOGGING on Tables that are created with the LOGGING option, can you please let me know that it is to increase performance during the creation / rebuild indexes?
Thank you
Published by: user12088323 on December 28, 2010 12:45
Published by: user12088323 on December 28, 2010 12:47
user12088323 wrote:
The database is in log mode archive. I would like to create indexes with NOLOGGING option on the tables to increase performance. The tables are created with the LOGGING option. Can you please let me know it's to create a bad effect on the database? If so, please explain.Thank you
Published by: user12088323 on December 28, 2010 16:37
NOLOGGING will cease to produce data AGAIN... for which you want to execute the instructions.
Nothing wrong... it is created by ORACLE ;-)
read this and cross with your process. You can do it with nologging option.
http://www.Oracle.com/technetwork/database/RDB/0804-NOLOGGING-option-130004.PDF
hope you understood
Tags: Database
Similar Questions
-
Diff bet rebuilding indexes with NOLOGGING and UNRECOVERABLE
Hello
What would you please tell me what is the difference beterrn rebuilding of indexes with NOLOGGING and UNRECOVERABLE.
Thank youMeaning remains the same. UNRECOVERABLE has been deprecated (it is there only for backward compatibility) and he was replaced by NOLOGGING.
Kind regards
S.K. -
Performance problem of creating index with LOB/CLOB content
Hello
I have a problem with indexing performance with a table containing columns of text
also a clob and a lob column.
Indexing with 20,000 lines takes about 1 hour on 11.2.0.4 with the last batch of patches 12 on
win x 64.
on a 11.2.0.1, the process is done in a few minutes.
So what can I do to find out where is the problem?
I use filter auto and basic lexer.
Operating system is W 2008 R2 SP and latest patches. OS lang is English.
DB is installed with AL32UTF8 and German and English language packs.
also watched and ctx_user_index_errors and pending and there is no error or waiting in lines.
After the index is created, everything works fine. during the creation of index no other user is connected to the database.
so why 11.2.0.1 is so much faster than 11.2.0.4?
some advice for me?
Thank you!Hello
so I solved all my problems.
So I made two changes:
1. I declared the variable theNotiz2 for recording the output for the raw text of the column NOTIZ (is a clob), add the output to the Out-Clob parameter
2. I used the same variable for the--> this blob field caused an error with line with lob is not locked... so I said a second variable for this and that solved the problem.
normally, I think it should work with 1 variable... but is an acceptable workaround.
Performance now is OK because the procedure, I can set on which the documents I want to do a search or not.
Second thing, but has nothing to do with Oracle: my frontend application makes a ZIP for each insert in a column lob and if the ctxhx does not index the content, the MDC, and before calling the conversion of plain text, so I have to make a decompression of the blob...
so for now, all problems solved. Thank you for your support.
-
rebuild indexes with NOLOGGING
I like to read
http://richardfoote.files.WordPress.com/2007/12/index-internals-rebuilding-the-truth.PDF
and he says
'Reconstructions of Index generate massive amounts of acetate to redo.
which is a point just, but because we can do it with NOLOGGING, why would you ever rebuild an index with a RECORD? I mean, we can always rebuild using the table, even if our database crashed. So we should always do with NOLOGGING, and point Richard becomes rather redundant, isn't?
I mean, Richard knows a lot more than me and I am in no way challenge his authority, I just don't see why we worry index generating a lot of when we can easily put out of service.
Thank youAmong other things, think about what happens if you have a recovery site after a disaster and you are using DataGuard to maintain the previous day. This will require that all elementary operations are recorded and thus eliminate your ability to make reconstructions NOLOGGING indices on the main machine.
Justin
-
Cannot create Index with an If statement
Hello:
I would run the code to create an index on a given table, but only if the index does not exist. Here's what I have so far...
DECLARE
c_Count NUMBER;
BEGIN
SELECT COUNT (*) FROM c_Count
OF DBA_INDEXES
WHERE TABLE_NAME = 'SOME_TABLE_NAME '.
AND INDEX_NAME = "SOME_INDEX_NAME."
AND OWNER = 'SOME_OWNER. '
AND TABLE_OWNER = "SOME_OWNER";
IF c_Count = 0 THEN
CREATE INDEXES SOME_OWNER. SOME_INDEX ON SOME_OWNER. UNE_TABLE (SOME_KEY);
END IF;
END;
The SELECT INTO statement works well alone.
Boredom comes with the IF statement. I get the following error message:
PLS-00103: encountered the symbol "CREATE" when waiting for one of the following values: begin case declare exit for goto if loop...
This is the typical error saying that the syntax is incorrect, and that the parser was expecting something else after the IF-THEN statement. Any ideas on what may be a problem? Thanks in advance.
JerryHello
You must use EXECUTE IMMEDIATE to the DDL in PL/SQL.
DECLARE c_Count NUMBER; BEGIN SELECT COUNT(*) INTO c_Count FROM DBA_INDEXES WHERE TABLE_NAME = 'SOME_TABLE_NAME' AND INDEX_NAME = 'SOME_INDEX_NAME' AND OWNER = 'SOME_OWNER' AND TABLE_OWNER = 'SOME_OWNER'; IF c_Count = 0 THEN EXECUTE IMMEDIATE 'CREATE INDEX SOME_OWNER.SOME_INDEX ON SOME_OWNER.SOME_TABLE(SOME_KEY)'; END IF; END;
Kind regards
-
On Oracle 11.2, I observed below
How to find the true picture of this index column?create index ind_jperson_1 on d_jperson(convict_ref); create index ind_jperson_2 on d_jperson(driver_ref DESC); select index_name,table_name,column_name,column_position,descend from USER_IND_COLUMNS where table_name='D_JPERSON' INDEX_NAME TABLE_NAME COLUMN_NAME COLUMN_POSITION DESCEND IND_JPERSON_2 D_JPERSON SYS_NC00023$ 1 DESC IND_JPERSON_1 D_JPERSON CONVICT_REF 1 ASC
Hello
DBA_IND_EXPRESSIONS can help you find the real column name.
And it is an expected behavior in Oracle. Have you noticed anything else pre 11.
Concerning
Anurag -
Failed to create index with imdp
I am trying to import an image with the following command:
Impdp user/pass DIRECTORY = SCHEMAS DUMPFILE = fump.dmp = originally_schema REMAP_SCHEMA = originally_schema:new_schema TABLE_EXISTS_ACTION = DATA_PUMP_DIR replace old = REMAP_TABLESPACE: new
I don't know how the dump has been exported.
Source DB version: 11.2.0.4
Destination DB version: 11.2.0.1
Everything works fine until it comes to the creation of index:
Processing object type SCHEMA_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX
ORA-39083: Type what INDEX failed to create object error:
ORA-06550: line 2, column 1:
PLS-00306: wrong number or types of arguments in the call to "CREATE_INDEX.
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
Because sql is:
BEGIN
ctxsys.driimp.create_index('I_SRC_NAME','SOURCES',User,'ID','2','NAME','1','1020','32','8130','33',, NULL, NULL, 0,'Y','ON COMMIT','12582912',, NULL, null);
ctxsys.driimp.set_object('DATASTORE','DIRECT_DATASTORE',0);
ctxsys.driimp.set_object ('TYPE ',' CHAR_)
Hope you can help me.
& then you cannot use V11.2.0.4 expdp use impdp since V11.2.0.1
expdp should include VERSION = 11.2.0.1
-
CREATE INDEX with ON DUPLICATE
Hello
I use Oracle10g Express (v10.2.0). What is given the equivalent query in Oracle for SQL Server query below?
CREATE UNIQUE INDEX uix_NumberUnique ON UserInfo(UserID, Number)
WITH (IGNORE_DUP_KEY = ON)
I appreciate your inputs.
Thank you
JonathanHere is an example
SQL> create table t (no integer primary key); Table created. SQL> exec dbms_errlog.create_error_log('T','T_ERR') PL/SQL procedure successfully completed. SQL> insert into t select no from ( select 1 no from dual union all select 2 no from dual union all select 1 no from dual ) log errors into t_err('Insert Error') reject limit unlimited; 2 3 4 5 6 7 8 2 rows created. SQL> select * from t 2 / NO ---------- 1 2 SQL> exec dev_util.print_table('select * from t_err') ---------------------------------------------------------------------------------------------------- Field Name Field Value ---------------------------------------------------------------------------------------------------- ORA_ERR_NUMBER$ : 1 ORA_ERR_MESG$ : ORA-00001: unique constraint (ARBORU.SYS_C00407493) violated ORA_ERR_ROWID$ : ORA_ERR_OPTYP$ : I ORA_ERR_TAG$ : Insert Error NO : 1 PL/SQL procedure successfully completed. SQL>
-
Creating datagrid with sorting options &; filter function
function createDatagrid():
DataGrid
var dp:DataProvider = new DataProvider();
AddIn entries
for (var i = 0; i < = guestlistArray.length - 1; i ++) {}
var str_guestlist:String = guestlistArray [i];
var guestlistColArray:Array = str_guestlist.split(",");
dp.addItem ({id: guestlistColArray [0], name: guestlistColArray [1] last_name:guestlistColArray [2],})
designation: guestlistColArray [3], e-mail: guestlistColArray [4], [5], mobile: guestlistColArray
Office: guestlistColArray [6], company: guestlistColArray [7] barcode:guestlistColArray [8],
Photo: guestlistColArray [9] table_no:guestlistColArray [10], [11], of participation: guestlistColArray
arrival_time:guestlistColArray[12]});
}
QUESTION: All these needs entrances around some sounds loading, is there any code that I can use to view the progress of the loading, 0% - 100%?
reset the entry from the table
guestlistColArray = new Array();
QUESTION: What is the best way to remove all of the entries in a table?
//give every col, a name
myDataGridList.columns = ['id', 'name', 'name', 'description', 'email', 'mobile', 'office',
'barcode', 'photo', 'table_no', 'presence', 'society', "arrival_time"];
//set display width of col
myDataGridList.getColumnAt (0) .width = 40;
myDataGridList.getColumnAt (7) .width = 180;
//set display names of col
myDataGridList.getColumnAt (0) .headerText = "ID";
.headerText myDataGridList.getColumnAt (7) = "company";
Set the sorting options
myDataGridList.getColumnAt (0) .sortOptions = Array.NUMERIC;
myDataGridList.getColumnAt (7) .sortOptions = Array.CASEINSENSITIVE;
QUESTION: I need to click on the column first in order to make it work. How can I sort the columns automatically when the datagrid control is created and illustrated?
myDataGridList.dataProvider = dp;
creating a filter on top of datagrid bar
I have a textfield of entry for the user to type something. (txt_filter)
It filters the data in the datagrid control according to the keywords typed in by the user in the input textfield object.
Now, the TextField is ready for entry. It should only filter the first_name, last_name.
QUESTION: How can I make the filter works? How can I open an event listener to detect the pressure inside the txt_filter and filter all the data?
Hi all
The above is my doubts to sort a datagrid and a function of filter for datagrid. Hope you could give me some advice on this.
Thank you
-Zainuu
I hope you followed the tutorial image from here, so that you have the same image. He too they have followed the path that have seen us in the tutorial of this law of 16 series.
http://www.Adobe.com/devnet/flash/QuickStart/datagrid_pt3.html (scroll down and see the image, loading method)
// Create a new DataGridColumn object, and specify a custom cell renderer.
var dataCol:DataGridColumn = new DataGridColumn("data");
dataCol.cellRenderer = LoaderCellRenderer;
// Create a new DataGridColumn object.
var titleCol:DataGridColumn = new DataGridColumn("title");
-
ALTER INDEX with parallel and Nologging
I want to move some indexes to a different tablespace. For this I use the SQL below:
XYZ ALTER INDEX REBUILD TABLESPACE TS_INDX01 NOLOGGING PARALLEL 8;
I use NOLOGGING and PARALLEL thinking it will speed up the process of movement. But now I'm confused because I think that this will change the index property, as in, when we create an index specify us certain parallels and logging properties.
So I want to understand:
1. the SQL above to change the properties of the index?
2. How can I check the existing nologging and parallel properties of an index?
SQL> create table temp (no integer, name varchar2(100)); Table created. SQL> create index temp_idx on temp(no); Index created. SQL> select degree, logging from user_indexes where index_name = 'TEMP_IDX'; DEGREE LOG ---------------------------------------- --- 1 YES SQL> drop index temp_idx; Index dropped. SQL> create index temp_idx on temp(no) nologging parallel 5; Index created. SQL> select degree, logging from user_indexes where index_name = 'TEMP_IDX'; DEGREE LOG ---------------------------------------- --- 5 NO SQL> alter index temp_idx parallel 1 logging 2 ; Index altered. SQL> select degree, logging from user_indexes where index_name = 'TEMP_IDX'; DEGREE LOG ---------------------------------------- --- 1 YES
-
Hi all
AM creating packages with Creative could conditioner, need to include 'Extension Manager CS6 ' to my list of requests, I downloaded a version and trying to add to the list with the help of add the option offline media, but get the error as media is not appropriate etc...
Can any body please let me know how to add media offline while we creating packages with Creative Cloud Packager.
Thanks in advance.
This is possible in theory, as long as the source media that you add is complete and unzipped. Also if 32 bit it cannot be added to a 64-bit package and vice versa.
It's not really what this feature is designed for good. It is designed for DVD sets provided to customers who live in areas where poor internet infrastructure that cannot download apps via CCP.
-
Problem with CREATE INDEX script
Hello world!
I want to create a 3D Spatial Index. So I added a few lines (PARAMETERS ('sdo_indx_dims = 3')) in the following script, I get the error
PLS-00103: encountered the symbol "SETTINGS" then wait for the following :), * & = - + <>.
PLS-00103: encountered the symbol "SDO_INDX_DIMS" then wait for the following :), * & = - + <>.
Everything works well, if I remove the PARAMETERS ('sdo_index_dims = 3').
I know that I need a few symbols, but I'm not good in programming
Thanks for the tips!
-create spatial indexes
--
procedure create_index
newIndex user_indexes.index_name%type;
Start
list_spatial_indexed_tables;
-Find all tables containing columns and a corresponding line in user_sdo_geom_metadata
- and without a spatial index
for rec in spatial_index_cursor
loop
newIndex: = rec.table_name | '_RTREE_IDX ';
Execute ('create index' | newIndex |) "on" |
Rec.table_name | ' (' | rec.column_name |)
indextype') is mdsys.spatial_index ('sdo_indx_dims = 3') SETTINGS ');
end loop;
list_tables_missing_sdo_data ("spatial index cannot be created");
end create_index;Hello
in a string, you must make to a single quote, two quotes, then do this:
-- create spatial indexes -- procedure create_index is newIndex user_indexes.index_name%type; begin list_spatial_indexed_tables; -- Find all tables containing spatial columns and a corresponding row in user_sdo_geom_metadata -- and without a spatial index for rec in spatial_index_cursor loop newIndex := rec.table_name || '_RTREE_IDX'; run ('create index ' || newIndex || ' on ' || rec.table_name || '(' || rec.column_name || ') indextype is mdsys.spatial_index PARAMETERS (''sdo_indx_dims=3'')'); end loop; list_tables_missing_sdo_data ('spatial index can not be created'); end create_index;
If the quotes to the parameters clause must be doubled.
Herald tiomela
Superconsult.nl -
How to create indexes on the ordered collection of XMLTYPE table?
I use Oracle 11.2.0.2.
Basically, my XML documents have a 3-level hierarchy:
event
+ - action [1: n]
+ - param [1: n]
I try to create indexes on the tables of the orderly collection, but cannot get the right syntax...
I created a table with an XMLType object-relational 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 execute the SELECT statement:
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 plan of the explain command looks like this (sorry, don't know how to get it formatted any 'eye-team'):
----------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |
----------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1609K | 6316M | | 6110K (1) | 20:22:11 |
|* 1 | HASH JOIN | | 1609K | 6316M | 111 M | 6110K (1) | 20:22:11 |
| 2. TABLE ACCESS FULL | T_C_RMP_MNTRNG_XML_FULL_IL4 | 582K | 104 M | | 5241 (1) | 00:01:03 |
|* 3 | TABLE ACCESS FULL | T_OR_MON_ACTION | 32 M | 117G | | 105K (2) | 00:21:08 |
----------------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
1 - access ("NESTED_TABLE_ID"= "T_C_RMP_MNTRNG_XML_FULL_IL4"." ("SYS_NC0001300014$")
filter (CAST (SYS_XQ_UPKXML2SQL (SYS_XQEXVAL (SYS_XQEXTRACT ((SYS_XMLGEN ("T_C_RMP_MNTRN XMLCONCAT
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$ ')),'/ ID ', 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 sample used for this survey (level = 2)
-Construction detected no optimized XML (activate 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 tables of the ordered collection 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 to this particular case...
Thank you in advance...
If the schema is not annotated and XS: Integer and XS: String are mapped to types of data NUMBER and VARCHAR2 (4000), so you must use in your query to avoid typecasting unnecessary operations.
You must also use XMLTABLEs chained when accessing a parent/child instead of a FLWOR expression relationship, otherwise the CBO cannot rewrite the XQuery query correctly (maybe it's fixed in the latest version).
If you make these changes, the plan should show the cleaner predicates:
SQL > SELECT EVENT_ID, MESSAGE_ID, ACTION_TYPE, ACTION_SUB_ID, ACTION_TIMESTAMP
2 FROM test_table
3 XMLTABLE ('/ monitoring ')
4 COLUMNS XML_CONTENT OF PASSAGE
5 WAY of VARCHAR2 (4000) EVENT_ID "ID."
6 actions for XMLTYPE PATH 'action '.
(7) T1,
8 XMLTABLE ('/ action')
Shares of PASSAGE 9 COLUMNS
NUMBER of ACTION_SUB_ID 10 PATH "actionSubId."
11 PATH of VARCHAR2 (4000) ACTION_TYPE "type."
12 WAY of NUMBER ACTION_TIMESTAMP 'time '.
(13) T2
14 WHERE EVENT_ID IS NOT NULL
15 AND ACTION_SUB_ID IS NOT NULL
16;
Execution plan
----------------------------------------------------------
Hash value of plan: 1763884463
------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 109. 220K | 6 (17). 00:00:01 |
| 1. THE 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 SCAN FULL | SYS_C007567 | 11. | 1 (0) | 00:00:01 |
|* 4 | JOIN TYPE. | 109. 216K | 4 (25) | 00:00:01 |
|* 5 | TABLE ACCESS FULL | T_OR_MON_ACTION | 106 S 216K | 3 (0) | 00:00:01 |
------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
2 - filter("TEST_TABLE".") (' SYS_NC00012$ ' IS NOT NULL)
4 - access("SYS_ALIAS_0".") NESTED_TABLE_ID "=" TABLE_TEST. " ("' SYS_NC0000800009$ ')
filter ("SYS_ALIAS_0". "NESTED_TABLE_ID"="TABLE_TEST" "." " ("SYS_NC0000800009$")
5 - filter("SYS_ALIAS_0"." actionSubId» IS NOT NULL)
Note
-----
-dynamic sample used for this survey (level = 2)
Now, if it is still necessary, everything boils down to choosing a technique for index NULL values:
-composite index with a column not zero or constant
-FBI
-bitmap image
Choose the one that best fits your data, the selectivity and activity on the tables.
-
Cannot create indexes on the flow table
Hello
I'm new to ODI.
The problem is that during the execution of an interface, I get the error of the "IKM Oracle Dimension to slow variation"
The command in step "Create unique index on the flow table:
creating index < % = odiRef.getTable ("L", "INT_NAME", "A") % > idx
on < % = odiRef.getTable ("L", "INT_NAME", "A") % > (< % = odiRef.getColList ("", "[column]", ",", "", "SCD_NK") % >)
< % = odiRef.getUserExit ("FLOW_TABLE_OPTIONS") % >
generate the following statement which lacks the name of the column between the (_)
Create index I$ _MYTABLE_idx
I have $_MYTABLE)
NOLOGGING
The result is that the interface fails with the error 936: 42000: java.sql.SQLException: ORA-00936: lack of expression caused by the previous command wrong.
Please, can you help me?
Thank you very much
Angelo
Hello
I'm really really sorry! I just realized that you are working on the SCD. Basically, you are looking for all the column mapped as SCD_NK (key to slowly change natural Dimensions) insofar as shown here
IF you need to read this
Let me know.
-
Creating INDEX on a BLOB column in a separate tablespace
Hello
Our database contains 2 storage spaces :
-Tablespace DATA : is reserved to hold the data.
-Tablespace INDX: is reserved to hold the index.
For some reason, that we must create the indexes on columns of type blob and the pending order are:
SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_content) INDEXTYPE IS CTXSYS. CONTEXT; / / doc_content a blob type.
SQL> index created
Now, all indexes are created in the tablespace for DATA that is not good, they should be created in the tablespace INDX (now is empty)
For this reason, and after a search, I specified the tablespace INDX , which will contain the index, and the used command is:
SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_content) INDEXTYPE IS CTXSYS. CONTEXT TABLESPACE INDX;
*
ERROR on line 1:
ORA-29850: invalid option for creating domain index
NB: also, when I try to use the same command with varchar column, it works.
SQL > CREATE INDEX my_index ON DOC_CONTENTS (doc_name) TABLESPACE INDX; / / doc_content a type VARCHAR2.
SQL> index created
Do you have an idea on how to create indexes on a blob column in a different tablespace?
This question has nothing to do with the Oracle objects, but is related to Oracle Text, then perhaps that some moderator moves text objects.
To specify a storage space for a ctxsys.context Oracle Text index domain index tables, you must create a storage preference, specify storage spaces in attributes of this preference, then use this preference in settings of creating index. Please see the example below which shows first create domain index tables in the default users tablespace, then the creation of the field tables to be indexed in the example tablespace.
Scott@orcl_11gR2 >-test environment:
Scott@orcl_11gR2 > doc_contents CREATE TABLE
2 (doc_content BLOB)
3.
Table created.
Scott@orcl_11gR2 > INSERT INTO doc_contents VALUES
2 (UTL_RAW. CAST_TO_RAW ("test data"))
3.
1 line of creation.
Scott@orcl_11gR2 >-create domain index tables in default users tablespace:
Scott@orcl_11gR2 > my_index CREATE INDEX
2 doc_contents (doc_content)
3 INDEXTYPE IS CTXSYS. FRAMEWORK
4.
The index is created.
Scott@orcl_11gR2 > SELECT index_name, nom_tablespace
2 FROM user_indexes
3. WHERE index-name LIKE '% MY_INDEX % '.
4.
INDEX_NAME TABLESPACE_NAME
------------------------------ ------------------------------
MY_INDEX
DR.$ MY_INDEX$ X USERS
2 selected lines.
Scott@orcl_11gR2 > SELECT table_name, nom_tablespace
2 FROM user_tables
3 WHERE table_name LIKE '% MY_INDEX % '.
4.
TABLE_NAME, TABLESPACE_NAME
------------------------------ ------------------------------
DR. MY_INDEX$ I HAVE USERS
USERS R DR$ MY_INDEX$
DR.$ MY_INDEX$ N
DR.$ MY_INDEX$ K
4 selected lines.
Scott@orcl_11gR2 >-creating the tables index field in example of tablespace:
Scott@orcl_11gR2 > my_index DROP INDEX
2.
The index is deleted.
Scott@orcl_11gR2 > start
2 ctx_ddl.create_preference ("mystore', 'BASIC_STORAGE'");
3 ctx_ddl.set_attribute ("mystore', 'I_TABLE_CLAUSE',")
4 "tablespace storage example (original 1 K) ');
5 ctx_ddl.set_attribute ("mystore', 'K_TABLE_CLAUSE',")
6 "tablespace storage example (original 1 K) ');
7 ctx_ddl.set_attribute ("mystore', 'R_TABLE_CLAUSE',")
8 ' lob tablespace storage example (original 1 K)
9 (data) store as (storage off in row cache)');
10 ctx_ddl.set_attribute ("mystore', 'N_TABLE_CLAUSE',")
11 "tablespace storage example (original 1 K) ');
12 ctx_ddl.set_attribute ("mystore', 'I_INDEX_CLAUSE',")
13 ' example of tablespace storage (initial 1 K) compress 2 ');
14 ctx_ddl.set_attribute ("mystore', 'P_TABLE_CLAUSE',")
15 "tablespace storage example (original 1 K) ');
16 ctx_ddl.set_attribute ("mystore', 'S_TABLE_CLAUSE',")
17 "tablespace storage example (original 1 K) ');
18 end;
19.
PL/SQL procedure successfully completed.
Scott@orcl_11gR2 > my_index CREATE INDEX
2 doc_contents (doc_content)
3 INDEXTYPE IS CTXSYS. FRAMEWORK
4 PARAMETERS ('STORAGE mystore')
5.
The index is created.
Scott@orcl_11gR2 > SELECT index_name, nom_tablespace
2 FROM user_indexes
3. WHERE index-name LIKE '% MY_INDEX % '.
4.
INDEX_NAME TABLESPACE_NAME
------------------------------ ------------------------------
MY_INDEX
DR.$ MY_INDEX$ X FOR EXAMPLE
2 selected lines.
Scott@orcl_11gR2 > SELECT table_name, nom_tablespace
2 FROM user_tables
3 WHERE table_name LIKE '% MY_INDEX % '.
4.
TABLE_NAME, TABLESPACE_NAME
------------------------------ ------------------------------
DR. MY_INDEX$ I EXAMPLE
DR.$ MY_INDEX$ R EXAMPLE
DR.$ MY_INDEX$ N
DR.$ MY_INDEX$ K
4 selected lines.
Post edited by: BarbaraBoehmer (corrected for error due to the already existing preference)
Maybe you are looking for
-
Recovery P200-1EE broadcast disk
Is there a creator of recovery disk available for this model that I looked on the computer and there is no option to create a.I have misplaced mine and want to be able to recover if necessary.
-
I have problems connecting to Google of Safari
When fate Safari "standby" mode does not connect to Google. You have to turn the Wi - Fi turned off, and then click to connect. A new computer was given to me by Apple because they thought it was a hardware problem. The same problem. reloaded the OS
-
HP 8600 pro: whitish printing HP 8600
My screen of the printer has become whitish (I can barely see the functions) and it stopped printing from my computer. I have turned off and unplugged and restarted but no change
-
Play Battlestar Galatica freezes
freezes again after a short play. What is the solution. Vista 64-bit. PC
-
The Vista taskbar (at the top of each page) worked and after reboot it is disappeared under my access code. Other users of this computer have this page function Vista that shows when the cursor is on it. How to turn this feature back on?