Using TREX to index R3(WAS) tables
Hi,
I am developing a bsp application on WAS 6.40 and I will like to know if there is a way to use TREX in order to index table contents. Of course, I need also a way to use TREX for searching. Can anyone help?
Hi,
I order to have a quicker response, I think you should post this question in KM forum.
Meanwhile, have a look at things like
http://help.sap.com/saphelp_nw04/helpdata/en/22/89ab46e2674648aec9c0c7c0c040b0/frameset.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/81c1ca90-0201-0010-a2a1-b0412ec9cd1a
and https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ec4ee290-0201-0010-6c8d-98db9abff2cc
Eddy
Similar Messages
-
Why Oracle not using the correct indexes after running table stats
I created an index on the table and ran the a sql statement. I found that via the explain plan that index is being used and is cheaper which I wanted.
Latter I ran all tables stats and found out again via explain plan that the same sql is now using different index and more costly plan. I don't know what is going on. Why this is happening. Any suggestions.
ThxI just wanted to know the cost using the index.
To gather histograms use (method_opt is the one that causes the package to collect histograms)
DBMS_STATS.GATHER_SCHEMA_STATS (
ownname => 'SCHEMA',
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
block_sample => TRUE,
method_opt => 'FOR ALL COLUMNS SIZE AUTO',
degree => 4,
granularity => 'ALL',
cascade => TRUE,
options => 'GATHER'
); -
Use TREX to index /search archive on IXOS?
I wonder whether TREX can index/search archives on IXOS.
Could anybody share experience here?
Thanks!Hi Eric,
Using SAP Netweaver Enterprise Search you can search content from ERP, BI, KM, File Search, Business Object Search, Search in Webservice etc., for more information please go through this URL
https://websmp209.sap-ag.de/nwes70
Please provide points if this helps you -
Using a Value index on XMLIndex path table.
I am trying to understand how to capitalize on the VALUE index created on a XMLIndex path table. So far, I have not been able to successfully use it. I am not sure whether I am misunderstanding the way it is intended to be used? Or am making a mistake somewhere else along the way. Here is a use-case where I think that it should be getting picked up by the optimizer:
CREATE TABLE TEST_TABLE
(ID VARCHAR2(128) NOT NULL,
XML_DATA XMLTYPE NOT NULL,
CONSTRAINT TEST_PK PRIMARY KEY (ID))
XMLTYPE COLUMN XML_DATA STORE AS BINARY XML;
-- Populate the table with some random data. Here, our single attribute should be
-- unique for each row.
INSERT INTO TEST_TABLE (
SELECT dbms_random.string('A', 15), XMLElement("Test", XMLAttributes(dbms_random.string('A', 15) as "someAttr"))
FROM DUAL
CONNECT BY LEVEL <= 20000 );
CREATE INDEX test_xmlindex_ix ON TEST_TABLE(XML_DATA) INDEXTYPE IS XDB.XMLIndex
PARAMETERS('
PATHS (Include (/Test/@someAttr))
PATH TABLE test_path_table
PATH ID INDEX test_path_id_ix
ORDER KEY INDEX test_key_ix
VALUE INDEX test_value_ix ');
-- Not sure if I need these or not?
CALL DBMS_STATS.GATHER_TABLE_STATS ('MYSCHEMA', 'TEST_TABLE');
CALL DBMS_STATS.GATHER_TABLE_STATS ('MYSCHEMA, 'TEST_PATH_TABLE');
-- Now, I would expect this query to use the Value index that was created.
-- Instead, the Explain plan indicates that TEST_PATH_ID_IX was used..
SELECT xml_data
FROM test_table v
WHERE extractValue(v.xml_data, '/Test/@someAttr') = ?
Here are the operations listed in the explain plan for the query:
SELECT STATEMENT
FILTER
TABLE ACCESS(FULL) MYSCHEMA.TEST_TABLE
TABLE ACCESS(BY INDEX ROWID) MYSCHEMA.TEST_PATH_TABLE
INDEX(RANGE SCAN) MYSCHEMA.TEST_PATH_ID_IXIf I understand everything correctly, here, there is no reason why the PATH ID index should have been used. Isn't this index strictly for the XML tags themselves? Why wouldn't it use the Value index?
Thanks,
JonPATH_TABLE
+=======================================================+
| PathID | RID | Order_Key | Locator | Value |
|-------------------------------------------------------|
| RAW | rowid | RAW | RAW | varchar2(4000) |
|-------------------------------------------------------|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
+=======================================================+
XMLIndex
1) PATH INDEX: (PathID, RID) - BTree
2) ORDER INDEX: (RID, ORDER_KEY) - BTree
3) VALUE INDEX: (substr("VALUE",1,1599)) - Function Based
Locator: Pointer to XML Fragments
XMLIndex - Namespace issue...
I believe that (although I don't know the exact mechanics) that it will use the path index first to find the needed
tree node / path, then will look for a locator that matches the request and if not will do an full table scan
afterwards, if not successful, trying to limit the request with the filter at hand, so see if it can be used, to
minimize the sub-results.
Message was edited by:
Marco Gralike -
Use secondary index in internal tables.
what are the uses of secondary index in internal table?
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb47446011d189700000e8322d00/content.htm
Creating Secondary Indexes
Proceed as follows to create a secondary index on a table:
In the field maintenance screen for the table, choose Goto --> Indexes.
1. If you went to the field maintenance screen of the table in display mode, only correct the index (and not the table).
If indexes already exist on the table, a list of these indexes is displayed. Choose Create. A dialog box appears in which you must enter the three-place index identifier. If there are no indexes, go directly to the dialog box.
2. Enter the index identifier and choose Continue.
You will go to the maintenance screen for indexes.
3. Enter an explanatory short text in the field Short text.
Choose TabFields.
4. A list of all the fields of the table is displayed.
5. Select the fields which you want to copy to the index.
6. Choose Copy.
The selected fields are copied to the index.
7. If the values in the index fields already uniquely identify each record of the table, select Unique index.
A unique index is automatically created on the database during activation because a unique index also has a functional meaning (prevents double entries of the index fields).
8. If it is not a unique index, leave Non-unique index selected. In this case you can use the corresponding radio buttons to define whether the index should be created automatically on the database for all database systems, for selected database systems or for no database system.
9. If you chose For selected database systems, you must specify these systems.
You have two possibilities here:
List of inclusions: The index is only created automatically during activation for the database systems specified in the list. The index is not created on the database for the other database systems.
List of exclusions: The index is not created automatically on the database during activation for the specified database systems. The index is automatically created on the database for the other database systems.
Click on the arrow symbol behind the radio buttons. A dialog box appears in which you can define up to 4 database systems. Use the corresponding radio buttons to decide whether this list should be treated as a list of inclusions or exclusions.
10. Activate the index with Index ® Activate. The activation log tells you about the flow of the activation. Call it with Utilities ® Act.log. If an error occurred when activating the secondary index, you will automatically go to this log.
The secondary index is automatically created on the database during activation if the corresponding table has already been created there and index creation was not excluded for the database system.
Reward points if useful. -
Qeury not using the bitmap index
Hi,
Pls have a look at the query below:
SELECT
A.flnumber,
A.fldate,
SUBSTR(C.sec,1,3) sect,
D.element,
C.class,
SUM(C.qty) qty,
A.indicator,
DECODE(A.indicator, 'I', B.inrt, 'O', B.outrt, 'R', B.rting, NULL) direction,
B.rting
FROM
Header A,
Paths B,
PathData C,
ElementData D
WHERE
(D.category='N') AND
(A.rt=B.rt) AND
(C.element=D.element) AND
(A.fldate=C.fldate AND
A.flnumber=C.flnumber) AND
C.element IN (SELECT codes FROM Master_codes WHERE type='F')
GROUP BY A.flnumber,
A.fldate,
SUBSTR(C.sec, 1, 3),
D.element,
C.class,
A.indicator,
DECODE(A.indicator,'I', B.inrt, 'O', B.outrt,'R', B.rting, NULL),
B.rting
UNION ALL
SELECT
A.flnumber,
A.fldate,
SUBSTR(C.sec,1,3) sect,
D.element,
C.class,
SUM(C.qty) qty,
A.indicator,
DECODE(A.indicator, 'I', B.inrt, 'O', B.outrt, 'R', B.rting, NULL) ROUTE_direction,
B.rting
FROM
Header A,
Paths B,
PathData C,
ElementData D
WHERE
(D.category='N') AND
(A.rt=B.rt) AND
(C.element=D.element) AND
(A.fldate=C.fldate AND
A.flnumber=C.flnumber) AND
C.element NOT IN (SELECT codes FROM Master_codes WHERE type='F')
GROUP BY A.flnumber,
A.fldate,
SUBSTR(C.sec, 1, 3),
D.element,
C.class,
A.indicator,
DECODE(A.indicator,'I', B.inrt, 'O', B.outrt,'R', B.rting, NULL),
B.rting
The cost in the explain plan is very high. The table PathData* has 42710366 records and there is a bitmap index on the flnumber_ and fldate* columns. But the query above does not use the indexes. The other tables in the list are fine as their respective PK and indexes are used but the table PathData* is going for a "Table Access by Local Index Rowid". dont know what it means but the cost for this is 7126 which is high. I cant figure out why is the query not using the bitmap indexes for this table.
Pls let me know what should be done.???Thread: HOW TO: Post a SQL statement tuning request - template posting
HOW TO: Post a SQL statement tuning request - template posting
SELECT a.flnumber,
a.fldate,
Substr(c.sec, 1, 3) sect,
d.element,
c.class,
SUM(c.qty) qty,
a.INDICATOR,
Decode(a.INDICATOR, 'I', b.inrt,
'O', b.outrt,
'R', b.rting,
NULL) direction,
b.rting
FROM header a,
paths b,
pathdata c,
elementdata d
WHERE ( d.category = 'N' )
AND ( a.rt = b.rt )
AND ( c.element = d.element )
AND ( a.fldate = c.fldate
AND a.flnumber = c.flnumber )
AND c.element IN (SELECT codes
FROM master_codes
WHERE TYPE = 'F')
GROUP BY a.flnumber,
a.fldate,
Substr(c.sec, 1, 3),
d.element,
c.class,
a.INDICATOR,
Decode(a.INDICATOR, 'I', b.inrt,
'O', b.outrt,
'R', b.rting,
NULL),
b.rting
UNION ALL
SELECT a.flnumber,
a.fldate,
Substr(c.sec, 1, 3) sect,
d.element,
c.class,
SUM(c.qty) qty,
a.INDICATOR,
Decode(a.INDICATOR, 'I', b.inrt,
'O', b.outrt,
'R', b.rting,
NULL) route_direction,
b.rting
FROM header a,
paths b,
pathdata c,
elementdata d
WHERE ( d.category = 'N' )
AND ( a.rt = b.rt )
AND ( c.element = d.element )
AND ( a.fldate = c.fldate
AND a.flnumber = c.flnumber )
AND c.element NOT IN (SELECT codes
FROM master_codes
WHERE TYPE = 'F')
GROUP BY a.flnumber,
a.fldate,
Substr(c.sec, 1, 3),
d.element,
c.class,
a.INDICATOR,
Decode(a.INDICATOR, 'I', b.inrt,
'O', b.outrt,
'R', b.rting,
NULL),
b.rting Edited by: sb92075 on Mar 13, 2011 7:58 AM -
Best way of Using Index on a Table.
I am trying to understand the phenomena of using INDEX on a Table
need some guidance!!!
Let us take this scenario
I have a table "MYRECORD" which has 4 attributes(or coulombs)
1. "STATE" (varchar) // this can have 49 different values like newyork, dehli etc
2. "YEAR" //a year like 2007
3. "MONTH" //a month like JAN,FEB etc
4. "CAT" (int) // type(category) of data represented by values 0 to 40
with a PRIMARY KEY(STATE,YEAR,MONTH,CAT)
now i will create index
1. INX_myrecord (STATE,YEAR,MONTH) on table MYRECORD
so now my question is
1. what is the effect on performance of DB it makes?
2. when I use a query
SELECT * FROM MYRECORD WHERE STATE="dehli" AND YEAR=2007 AND MONTH="JAN";
how will it get processed if index is created and not created.
3. how can I refer a index by name in a query if so possible?
Cheers,
UD
Message was edited by:
UDAYYou have edited your post. Now you have a primary key consisting of state, year, month and cat which makes an index on state, year and month useless as the already existing primary key can provide for retrieval of rows by index. If you don't have other columns - or just few other not being large varchar2 columns - you should have created the table as an IOT (Index Organized Table - avoiding to have separate table and index containing - nearly - the same data) in the first place.
As a primary key by definition can contain only unique non null values, a query like SELECT * FROM MYRECORD WHERE STATE='dehli' AND YEAR=2007 AND MONTH='JAN' cannot give you more than the number of distinct cat values (0 .. 40) + 1 (if cat can be null - presumed one/some of the corresponding state, year and month is not null)
The information processing depends principally of the query, the mere presence of an index does not make sure it will be used. If an index is used it means the index will be searched first then the table rows will be accessed by rowids contained in the index (usually a single row or a range of rows - a rather small number of them - is retrieved this way, your select for example). Submitting something like SELECT * FROM MYRECORD WHERE YEAR=2007 AND cat=33 would most likely produce a full table scan of myrecord table ignoring the primary key.
Regards
Etbin -
Space in bytes used by a single index in given table space
Hi All,
How can i find a table space used by index in bytes
Eg:
suppose i have a table space USERS and i have a table say customer . one index defined on table customer called CUSTOMER_UQ and mapped to table to table space USERS . How can i find the bytes used by object CUSTOMER_UQ in table space USERS.
ThanksThe used space in Karthik's example is the number of bytes actually used by entries in the index, not the amount of space allocated to the index itself.
To find out how much space in disk is allocated to the index you can use (as the owner of the index) something like:
SELECT bytes FROM user_segments
WHERE segment_name = <index name>You could also use all_segments or dba_segments if you have access as another user, but you would also need to specify the owner name.
John -
How to make use of Index of a table in report to fetch data?
Hi,
I need a sample code for select statement which is making use of INDEX of a table
to fetch data.
Doubt:
Can I fetch all the fields in the table by passing certain key fields of INDEX in where condition?Hi Raja,
1) Mention the fields that you wish from database table (incase you don't need all the fields from the database table).
2) Don't use the INTO CORRESPONDING FIELDS OF TABLE ztable clause.
3)Instead use INTO TABLE ztable (But take care that during the declaration of the ztable, the fields declared are in order that in database table to fetch the Records in sequence).
Please Find the Syntax and Code Below..
SELECT * FROM <TABLE>
WHERE <WHERE>
%_HINTS ORACLE 'INDEX("<TABLE>~<INDEX ID")'.
SELECT carrid
INTO TABLE t_spfli
FROM spfli
WHERE carrud IN s_carrid AND
connid IN s_connid
%_HINTS ORACLE 'INDEX("&SPFLI&" "SPFLI~XXX")'.
Hope this Is helpFul
Thanks
kalyan -
TREX on Portal-Server also used for search/index for SAP Records Management
Hi all,
can a installation of the TREX on the Portal-Server (or as separate Server) used for Portal Index/search and also in parallel for searching of Content in an SAP Records Management (means full text research of records/ dossier in the SAP RM) ? Some ideas, tips or settings to keep in mind ?
THX
marioHi Neil,
We have exactly the same problem. We installed a new SAP E-Commerce system on Microsoft Windws 2008 R2 with TREX Version 7.10.43.00. The TREX connection is okay. Also the catalogue replication works without any problems. The SAP support means it is a permission problem on the IIS. The problem isnu2019t solved yet and the message to the SAP support is in process.
What is your effect with this link?
http://localhost:<TREXNAMESERVER>/TREXHttpServer/
Default:
http://localhost:<30305>/TREXHttpServer/
Kind regards,
Roland -
Physical attributes for index on temp tables (using physical model)
I need create index on temp tables.
When I generate DDL, it includes physical attributes like ‘LOGGING NOCOMPRESS NOPARALLEL’.
I get error "ORA – 14451 (unsupported feature w/temporary tables)"
I’ve to use physical model in OSDM. How do I get rid of physical attributes in DDL for index?Hi,
Thanks for reporting this problem.
You can remove the LOGGING clause by opening the Properties dialog for the Index in the Physical model and setting its Logging property to the blank option.
However it's not possible to suppress the NOCOMPRESS and NOPARALLEL at the moment.
I've logged a bug on this.
As a workaround, you could do a global edit on the DDL file to remove all instances of NOCOMPRESS and NOPARALLEL.
David -
Problem in accessing mseg table using MSEG~M Index.
Hi Experts,
I am facing problem in accessing mseg table using MSEG~M Index. I used same sequence of fields and i tried with mandt field also. but it is not taking the Index and it is going for TImeout ABAP dump.
This are my codes used in different ways
1. SELECT mjahr
bwart
matnr
lifnr
dmbtr
kostl
aufnr
bukrs
FROM mseg CLIENT SPECIFIED INTO TABLE t_mseg2
WHERE mandt EQ sy-mandt AND
matnr NE SPACE AND
werks EQ p_werks AND
lgort NE '0000' AND
bwart IN (122,201,262) AND
sobkz NE '0'
%_HINTS ORACLE 'INDEX("MSEG" "MSEG~M")'.
2. SELECT mjahr
bwart
matnr
lifnr
dmbtr
kostl
aufnr
bukrs
FROM mseg INTO TABLE t_mseg2
WHERE matnr NE SPACE AND
werks EQ p_werks AND
lgort NE '0000' AND
bwart IN (122,201,262) AND
sobkz NE '0'
%_HINTS ORACLE 'INDEX("MSEG" "MSEG~M")'.
3. SELECT mjahr
bwart
matnr
lifnr
dmbtr
kostl
aufnr
bukrs
FROM mseg INTO TABLE t_mseg2
WHERE matnr NE SPACE AND
werks EQ p_werks AND
lgort NE '0000' AND
bwart IN (122,201,262) AND
sobkz NE '0'.
The above all code is not at all taking the index in Quality server .but in Development it is taking .In Quality server it is reading all datas without using the index and going Timeout ABAP dmup
Please, Suggest me some solutions.
Thanks in Advance.
Regards,
NandhaHi,
Without NE also not working out. i am facing same problem still.
SELECT bwart
matnr
lifnr
dmbtr
kostl
aufnr
FROM mseg CLIENT SPECIFIED INTO TABLE t_mseg
WHERE mandt EQ sy-mandt AND
werks EQ p_werks AND
bwart IN (122,201,262) AND
mjahr EQ p_year AND
bukrs EQ p_cc
%_HINTS ORACLE 'INDEX("MSEG" "MSEG~M")'.
Please,check and help me out from this issue.
Regards,
Nandha -
Indexed views using indexes on base table
Hi all,
CREATE VIEW Sales.vOrders
WITH SCHEMABINDING
AS
SELECT SUM(UnitPrice*OrderQty*(1.00-UnitPriceDiscount)) AS Revenue,
OrderDate, ProductID, COUNT_BIG(*) AS COUNT
FROM Sales.SalesOrderDetail AS od, Sales.SalesOrderHeader AS o
WHERE od.SalesOrderID = o.SalesOrderID
GROUP BY OrderDate, ProductID;
GO
--Create an index on the view.
CREATE UNIQUE CLUSTERED INDEX IDX_V1
ON Sales.vOrders (OrderDate, ProductID);
GO
--This query can use the indexed view even though the view is
--not specified in the FROM clause.
SELECT SUM(UnitPrice*OrderQty*(1.00-UnitPriceDiscount)) AS Rev,
OrderDate, ProductID
FROM Sales.SalesOrderDetail AS od
JOIN Sales.SalesOrderHeader AS o ON od.SalesOrderID=o.SalesOrderID
AND ProductID BETWEEN 700 and 800
AND OrderDate >= CONVERT(datetime,'05/01/2002',101)
GROUP BY OrderDate, ProductID
ORDER BY Rev DESC;
In the above code block, Sales.SalesOrderDetail and Sales.SalesOrderHeader are base tables.
Say suppose there are some indexes on some of the columns of these base tables. Are these indexes used when we write a query in which indexed view is mentioned
in the from clause?
Thanks, SrikarSO far as its a indexed view it wont use the indexes on base tables when you use it in a query as indexed view is persisted and exists as a physical object. SO it doent require definition to be substituted and data to be retrieved from the base objects.
The indexes will come handy while populating the indexed view.
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to use the delta index in TREX?
We have been using TREX with EP KM for 2 years.
However we never used the delta index functionality.
Could you share your experience on how to use delta indexes?
Thanks!Hai,
Please check the below link.....
http://help.sap.com/saphelp_nw70/helpdata/EN/d9/0418418291a854e10000000a1550b0/frameset.htm
Regards,
Yoganand.V -
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.
Maybe you are looking for
-
I have recently downloaded some songs to my 3rd generation ipod touch. I have home sharing. Normally when I turn my macbook pro on and click itunes the items I have purchased automatically download. But this time some songs did not. What is the p
-
How to insert a PDF document into a Word file?
I'm using Acrobat Standard 9 and Microsoft Word 2010 and I'm unable to insert a PDF document into a Word file. Operating system is Windows 7 Enterprize. Can someone help?
-
(5800) I have a problem with remote control AD-54 does not operate its function with the exception of answering calls
-
Cisco EPC3925 EuroDocsis Wifi turned off but light stays ON w/ recently updated firmware
hi there i have a Cisco EPC3925 EuroDocsis 3.0 2-PORT Voice Gateway and i just noticed that today they pushed an OTA firmware upgrade via ISP "Melita" here in Malta. It looks like now when i disable the wifi, the green led for wifi still stays on, di
-
Promised Discounts MISSING - What recourse do I have?
On 10/23 I spoke with Ameila. Though I have been a loyal Verizon customer for over 12 years never having switched I could not ignore the current deal sprint was offering. She assured me she would get as close as possible to keep me and my 2 other li