Sys.dm_os_waiting_tasks and create index.

Hi Team,
Please let us know reason below why am getting blocking_session_id =87 and blocking_exec_context_id=1 while theres no spid=87 with exec_context_id=1.
2) Here we are watching IO_completion with no resource description. it is normal?
session_id
exec_context_id
wait_duration_ms
wait_type
resource_address
blocking_task_address
blocking_session_id
blocking_exec_context_id
resource_description
87
7
0
IO_COMPLETION
NULL
NULL
NULL
NULL
NULL
87
5
34
IO_COMPLETION
NULL
NULL
NULL
NULL
NULL
87
0
6449787
CXPACKET
0x000000045E1911E0
0x0000000005C4FDC8
87
1
exchangeEvent id=Pipe20ec12700 WaitType=e_waitPipeGetRow nodeId=0
87
0
6449787
CXPACKET
0x000000045E1911E0
0x0000000005C77048
87
4
exchangeEvent id=Pipe20ec12700 WaitType=e_waitPipeGetRow nodeId=0
87
0
6449787
CXPACKET
0x000000045E1911E0
0x0000000005C80E08
87
2
exchangeEvent id=Pipe20ec12700 WaitType=e_waitPipeGetRow nodeId=0
87
0
6449787
CXPACKET
0x000000045E1911E0
0x0000000005C8B048
87
3
exchangeEvent id=Pipe20ec12700 WaitType=e_waitPipeGetRow nodeId=0
87
0
6449787
CXPACKET
0x000000045E1911E0
0x0000000005C63708
87
5
exchangeEvent id=Pipe20ec12700 WaitType=e_waitPipeGetRow nodeId=0
87
0
6449787
CXPACKET
0x000000045E1911E0
0x0000000005C9FDC8
87
6
exchangeEvent id=Pipe20ec12700 WaitType=e_waitPipeGetRow nodeId=0
87
0
6449787
CXPACKET
0x000000045E1911E0
0x0000000005C13DC8
87
7
exchangeEvent id=Pipe20ec12700 WaitType=e_waitPipeGetRow nodeId=0
87
0
6449787
CXPACKET
0x000000045E1911E0
0x0000000005C1C748
87
8
exchangeEvent id=Pipe20ec12700 WaitType=e_waitPipeGetRow nodeId=0
87
4
165
IO_COMPLETION
NULL
NULL
NULL
NULL
NULL
87
2
0
IO_COMPLETION
NULL
NULL
NULL
NULL
NULL
87
3
7
IO_COMPLETION
NULL
NULL
NULL
NULL
NULL
87
6
28
IO_COMPLETION
NULL
NULL
NULL
NULL
NULL
Regards,
Manish

Now it again go parallel.
Why Create Index going from serial to parallel (with earlier latch_ex to now again pageiolatch)
session_id
exec_context_id
wait_duration_ms
wait_type
blocking_task_address
blocking_session_id
blocking_exec_context_id
resource_description
87
7
49
 PAGEIOLATCH_SH
 NULL
NULL
NULL
7:1:87328786
87
8
47
 PAGEIOLATCH_SH
 NULL
NULL
NULL
7:1:87328914
87
2
29
 PAGEIOLATCH_SH
 NULL
NULL
NULL
7:1:87329746
87
0
590730
   CXPACKET
0x0000000005C4FDC8
87
2
exchangeEvent id=Port801ca400 WaitType=e_waitPortOpen nodeId=0
87
1
48
 PAGEIOLATCH_SH
 NULL
NULL
NULL
7:1:87328850
87
4
29
 PAGEIOLATCH_SH
 NULL
NULL
NULL
7:1:87329810
87
3
34
 PAGEIOLATCH_SH
 NULL
NULL
NULL
7:1:87329554
87
5
50
 PAGEIOLATCH_SH
 NULL
NULL
NULL
7:1:87328722
Manish

Similar Messages

  • ABAP Routine for Deleting and creating index for ODS in Process chains

    Any pointers for the ABAP Routine code for deleting and creating index for ODS in Process chains.

    Hi Sachin,
    find the following ABAP code to delete ODS ondex.
    data : v_ods type RSDODSOBJECT.
    move 'ODSname' to v_ods .
    CALL FUNCTION 'RSSM_PROCESS_ODS_DROP_INDEXES'
      EXPORTING
        I_ODS = v_ods.
    To create index:
    data : v_ods type RSDODSOBJECT.
    move 'ODSname' to v_ods .
    CALL FUNCTION 'RSSM_PROCESS_ODS_CREA_INDEXES'
      EXPORTING
        I_ODS = v_ods.
    hope it helps....
    regards,
    Raju

  • Error in Process chain while deleting index and create index

    While executing the process chain  for delete index  the process chain failed with the below error message as "The system has not finished loading request 445315 into data target ZECC_C01". While creating index also it failed with error message as "Lock NOT set for: Generate index, RSSM_PROCESS_INDEX terminated, because InfoCube/DSO object ZECC_C01 could not be locked".
    Please help me in solving this issue.
    Thanks & Regards,
    Bharathi

    Hi,
    Manage the data target - ZECC_C01 and check the request number 445315. Also check the subsequent data targets if further loading was erroneous. Check whether the request is green / Properly loaded or not.
    You can also use RSBKREQUEST table to check the request and its corresponding data target.
    This request is either red or yellow caused this failure.
    Hope this helps.
    Regards,

  • Problems with Multi-Polygon and creating index on it

    I have a multipolygon that was created from a SDO_AGGR_UNION and I'm trying to create an index on the geometry. It is failing with...
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in spatial index: [mdrcrtxfergm]
    ORA-13249: Error in spatial index: [mdpridxtxfergm]
    ORA-13200: internal error [ROWID:AAAW8+AAxAAAWdqAAA] in spatial indexing.
    ORA-13206: internal error [] while creating the spatial index
    ORA-13033: Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object
    ORA-06512: at "MDSYS
    I'm beginning to think it's an issue with Oracle 9.2.0.1 which is the version of database we are using. Just want to check to see if others have had problems with this.
    Here is the geometry of the object.
    mdsys.sdo_geometry(2007, 900001, NULL, mdsys.sdo_elem_info_array(1, 1003, 1, 125, 1003, 1, 489, 1003, 1, 739, 1003, 1, 825, 1003, 1, 941, 1003, 1, 1209, 1003, 1, 1237, 1003, 1, 1369, 1003, 1, 1511, 1003, 1, 1551, 1003, 1, 1727, 1003, 1, 2445, 1003, 1, 2547, 1003, 1, 3829, 1003, 1, 3937, 1003, 1, 4085, 1003, 1, 4095, 1003, 1, 4583, 1003, 1, 6149, 1003, 1, 6379, 1003, 1, 6433, 1003, 1, 6465, 1003, 1, 6485, 1003, 1, 6559, 1003, 1, 6577, 1003, 1, 6607, 1003, 1, 6773, 1003, 1, 6793, 1003, 1, 6807, 1003, 1, 6825, 1003, 1, 6833, 1003, 1, 6855, 1003, 1, 6885), mdsys.sdo_ordinate_array(235180.1, 1269688.5, 235179.9, 1269684.4, 235180.6, 1269680.3, 235182.1, 1269676.7, 235184.2, 1269673.3, 235187, 1269670.4, 235190.3, 1269668.1, 235194, 1269666.5, 235197.8, 1269665.6, 235200.8, 1269665.5, 235205.5, 1269666.8, 235230.8, 1269673.6, 235242.3, 1269676.5, 235261.8, 1269681.2, 235270.1, 1269683.2, 235281, 1269685.6, 235296.1, 1269689, 235335.7, 1269696.8, 235368.9, 1269702.5, 235372.8, 1269703.5, 235376.4, 1269705.4, 235379.5, 1269707.8, 235382.2, 1269710.9, 235384.1, 1269714.5, 235385.3, 1269718.3, 235385.7, 1269722.6, 235385.4, 1269726.3, 235384.2, 1269730.2, 235382.3, 1269733.7, 235379.9, 1269736.7, 235370.9, 1269745.9, 235357.1, 1269760.7, 235342.1, 1269778.7, 235332.3, 1269791.1, 235323.8, 1269802.8, 235320.4, 1269807.5, 235313.4, 1269818, 235309.4, 1269824, 235307.2, 1269827.6, 235304.5, 1269830.5, 235301.3, 1269832.8, 235297.7, 1269834.3, 235293.9, 1269835.2, 235289.8, 1269835.2, 235286.1, 1269834.4, 235282.4, 1269832.9, 235279.1, 1269830.6, 235278.1, 1269829.8, 235276.2, 1269825.5, 235274, 1269820.9))

    The elem_info_array for the multi-polygon is obviosuly wrong:
    mdsys.sdo_elem_info_array(1, 1003, 1, 125, 1003, 1, 489, 1003, 1, 739, 1003, 1, 825, 1003, 1, 941, 1003, 1, 1209, 1003, 1, 1237, 1003, 1, 1369, 1003, 1, 1511, 1003, 1, 1551, 1003, 1, 1727, 1003, 1, 2445, 1003, 1, 2547, 1003, 1, 3829, 1003, 1, 3937, 1003, 1, 4085, 1003, 1, 4095, 1003, 1, 4583, 1003, 1, 6149, 1003, 1, 6379, 1003, 1, 6433, 1003, 1, 6465, 1003, 1, 6485, 1003, 1, 6559, 1003, 1, 6577, 1003, 1, 6607, 1003, 1, 6773, 1003, 1, 6793, 1003, 1, 6807, 1003, 1, 6825, 1003, 1, 6833, 1003, 1, 6855, 1003, 1, 6885)
    The last entry should be something like: 6885,1003,1; instead it is just 6885.
    So the problem might be with sdo_aggr_union as it seems to be creating an invalid geometry.
    Can you post the data you used in generating this geometry with sdo_aggr_union ?
    siva

  • What is the difference between the drop and create the index and rebuild index ?

    Hi All,
    what is the difference between drop and create index & rebuild index ? i think both are same...Please clarify if both are same or any difference...
    Thanks in Advance,
    rup

    Both are same. Rebuilding an index drops and re-creates the index. 
    Ref:
    SSMS - https://technet.microsoft.com/en-us/library/ms187874(v=sql.105).aspx
    TSQL - https://msdn.microsoft.com/en-us/library/ms188388.aspx
    I would suggest you to also refer one of the best index maintenance script as below:
    https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html

  • Difference between Create Index without and with Parallel Clause

    Hi all.
    I want to know the difference between Create Index with Parallel clause and Create Index without Parallel clause.
    Any documentation.
    Thanks,
    Hassan

    Sure?
    dimitri@VDB> create table t parallel 3 as select * from all_objects;
    Table created.
    dimitri@VDB> set autotrace traceonly
    dimitri@VDB> select * from t;
    40934 rows selected.
    Execution Plan
    Plan hash value: 3050126167
    | Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | SELECT STATEMENT     |          | 40601 |  5075K|    50   (0)| 00:00:01 |        |      |            |
    |   1 |  PX COORDINATOR      |          |       |       |            |          |        |      |            |
    |   2 |   PX SEND QC (RANDOM)| :TQ10000 | 40601 |  5075K|    50   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
    |   3 |    PX BLOCK ITERATOR |          | 40601 |  5075K|    50   (0)| 00:00:01 |  Q1,00 | PCWC |            |
    |   4 |     TABLE ACCESS FULL| T        | 40601 |  5075K|    50   (0)| 00:00:01 |  Q1,00 | PCWP |            |
    --------------------------------------------------------------------------------------------------------------Looks like PQ to me.
    alter table t noparallel;
    Table altered.
    dimitri@VDB> select * from t;
    40934 rows selected.
    Execution Plan
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      | 40601 |  5075K|   135   (1)| 00:00:02 |
    |   1 |  TABLE ACCESS FULL| T    | 40601 |  5075K|   135   (1)| 00:00:02 |
    --------------------------------------------------------------------------Same if we use an Index:
    dimitri@VDB> create index t_idx on t(object_name) parallel 3;
    Index created.
    dimitri@VDB> select object_name from t;
    40934 rows selected.
    Execution Plan
    Plan hash value: 4278805225
    | Id  | Operation               | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |
    |   0 | SELECT STATEMENT        |          | 40601 |   674K|    50   (0)| 00:00:01 |        |      |            |
    |   1 |  PX COORDINATOR         |          |       |       |            |          |        |      |            |
    |   2 |   PX SEND QC (RANDOM)   | :TQ10000 | 40601 |   674K|    50   (0)| 00:00:01 |  Q1,00 | P->S | QC (RAND)  |
    |   3 |    PX BLOCK ITERATOR    |          | 40601 |   674K|    50   (0)| 00:00:01 |  Q1,00 | PCWC |            |
    |   4 |     INDEX FAST FULL SCAN| T_IDX    | 40601 |   674K|    50   (0)| 00:00:01 |  Q1,00 | PCWP |            |
    -----------------------------------------------------------------------------------------------------------------Everything done on a single CPU (also only one core in the CPU) AMD Box.
    Dim

  • Process Chain error while creating index on cube

    Hi All,
    I have two process chain P1 daily(except sunday) and P2 weekly(sunday), both have same process, i.e. cube C1 is loaded with same infopackage in both infopackage.
    Now, on saturday after laoding the content index creating process on cube c1 is failed by process chain P1, but on sunday P2 have laoded C1 correctly and created indexes.
    Now, my doubt is wheather i repeat process chain P1 from creating indexes or there is no need as indexes on cube are created by PC 2.
    kindly suggest,
    Regards,
    Rajvinder

    Hi Raj,
    There is no need of running the process chain P1, the data has been bought by the process chain P2.
    If there are any filters/data selection in infopackage level then you need to run the process chain P1.
    Be make sure about the process chains and there infopackages/dtp's.
    With Regards,
    Ravi Kanth

  • Problem in create index on file system repository

    I want to create an index on file system repository,but have some problem. 
    1) create a windows filesystem repository
    2) I can found the repository entry in KM content
    3) go into "index administration" and create index,but I can not found the entry when I pressed "add" button on datasources page

    hello Karsten
    thanks for your consideration.
    After create a Windows file system Repository,I create the index as the fowllowing step.
    1) go to the page System Administration=>Knowledge Managment=>Index Administration and click Create button for creating index, then a form appeared.
    2) fill in the for specified value, then press Create Index button to create index
    3) click on DataSource link, in the Datasource Tab, click the Add button, then I could see all of folders on the screen( such as documents,calendar,etc), but I can not found the Windows File system Entry that just I created.
    I can not create a index for the Windows File System
    what is the wrong with it?
    thanks

  • BI Loading to Cube Manually with out creating Indexes.

    BW 3.5
    I have a  process chain schedules overnight which loads data from the InfoCubes from the ODS after loading to the staging and transformation layer
    The data loaded into the InfoCube is scheduled in the process chain as
    delete Index > delete contents of the cube> Load Data to the Cube --> Create Index.
    Tha above process chain load to cube normally takes 5 - 6 hrs.
    The only concern I have is at times if the process chain fails at the staging layer and transformation layer then I have to rectify the same manually.
    After rectifying the error, now I have to load the data to the Cube.
    I have only left with couple of hours say 2-3 hrs to complete the process chain of the load to the cube because of business hours.
    Kindly let me know in the above case where I have short of time to load data to the cube via process chain
    can I manually delete the contents of the cube and load the data to the cube. Here I will not be deleting the existing index(s) and create Index(s) after loading to the Cube because creation of Index normally takes a long time which I can avoid where I am short of time.
    Can I do the above at times and what are the impacts
    If the load to the InfoCube schedules via process chain the other normal working days. Is it going to fail or it will go through
    Also deleting contents of the cubes deletes the indexes.
    Thanks
    Note: As far I understand that Index are created to improve the performance at loading and query performance level.
    your input will be appreciated.

    Hi Pawan,
    Please find below my views in bold
    BW 3.5
    I have a process chain schedules overnight which loads data to the InfoCubes from the ODS after loading to the staging and transformation layer
    The data loaded into the InfoCube is scheduled in the process chain as
    delete Index > delete contents of the cube> Load Data to the Cube --> Create Index.
    I assume you are deleting the entire contents of the cube. If this is the normal pattern of loads to this cube and if there are no other loads to this cube you may consider configuring a setting in the infocube which " Delete InfoCube indexes before each data load and then refresh" .This setting you would find in Performance tab in create index batch option. Read F1 help of the checkbox. It will provide with more info.
    Tha above process chain load to cube normally takes 5 - 6 hrs.
    The only concern I have is at times if the process chain fails at the staging layer and transformation layer then I have to rectify the same manually.
    After rectifying the error, now I have to load the data to the Cube.
    I have only left with couple of hours say 2-3 hrs to complete the process chain of the load to the cube because of business hours.
    Kindly let me know in the above case where I have short of time to load data to the cube via process chain
    can I manually delete the contents of the cube and load the data to the cube. YES, you can Here I will not be deleting the existing index(s) and create Index(s) after loading to the Cube because creation of Index normally takes a long time which I can avoid where I am short of time.
    Can I do the above at times and what are the impacts Impacts :Lower query performance and loading performance as you mentioned
    If the load to the InfoCube schedules via process chain the other normal working days. Is it going to fail or it will go through
    I dont probably understand the question above, but i assume you mean, that if you did a manual load will there be a failure next day. - THERE WOULDNT
    Also deleting contents of the cubes deletes the indexes.
    YES it does
    Thanks
    Pavan - You can skip creating indices, but you will have slower query performance. However if you have no further loads to this cube, you could create your indices during business hours as well. I think, the building of indices demands a lock on the cube and since you are not loading anything else u should b able to furnish it. Lastly, is there no way you can remodel this cube and flow...do you really need to have full data loads?
    Note: As far I understand that Index are created to improve the performance at loading and query performance level. TRUE
    your input will be appreciated.
    Hope it helps,
    Regards,
    Sunmit.

  • Performance issue with drop and re-create index

    My database table has about 2 million records. The index in the table was not optmized, so we created a new index lets call it index2. So this table now was the original index (index1) and the index2. We then inserted data into this table from the other box. It was running for a few weeks.
    Suddenly we noticed that a query which used to take a few seconds now took more than a minute. The execution plan was using the index2 which technically should be faster. We checked if the statistics were upto date and it was. So then we dropped the new index, re-ran the query and it completed in 10 sec's. It was usign the old index. This puzzled me since the point of the index2 was to make it better. So then we re-created index2 and genrated stats for the index. Re-ran the query and it completed in 5 sec's.
    Everytime we timed to run the query, I shutdown and restarted the box to clear all cache's. So all the time I have specified are pure time's and not cached. The execution plan using index2 taking 1 min and 5 sec's are nearly the same, with very minior difference in cost and cardnitality. Any ideas why index2 took 1 min before and after drop and create again takes only 5 sec.
    The reason I want to find the cause is to ensure that this doesn't happen again, since its impossible for me to re-create the index everytime I see this issue. Any thoughts would be helpful.

    Firstly the indexes are different index1 is only on the time column, where as index2 is a composite index consisting of 3 columns.
    Here are the details. The test that I did were last friday, 3/31. Yesterday and today when I executed the same query I get more increased times, yesterday it took 9 sec amd today 17 sec. The stats job kicked in on both days and is upto date. This table, nothing gets deleted. Only added.
    3/31
    Original
    Elapsed: 00:01:02.17
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6553 Card=9240 Bytes
    =203280)
    1 0 SORT (UNIQUE) (Cost=6553 Card=9240 Bytes=203280)
    2 1 INDEX (FULL SCAN) OF 'EVENT_NA_TIME_ETYPE' (NON-UNIQ
    UE) (Cost=15982 Card=2306303 Bytes=50738666)
    drop index EVENT_NA_TIME_ETYPE
    Elapsed: 00:00:11.91
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=7792 Card=9275 Bytes
    =204050)
    1 0 SORT (UNIQUE) (Cost=7792 Card=9275 Bytes=204050)
    2 1 TABLE ACCESS (BY INDEX ROWID) OF 'EVENT' (Cost=2092
    Card=2284254 Bytes=50253588)
    3 2 INDEX (RANGE SCAN) OF 'EVENT_TIME_NDX' (NON-UNIQUE
    ) (Cost=6740 Card=2284254)
    create index EVENT_NA_TIME_ETYPE ON EVENT(NET_ADDRESS,TIME,EVENT_TYPE);
    BEGIN
    SYS.DBMS_STATS.GENERATE_STATS('USER','EVENT_NA_TIME_ETYPE',0);
    end;
    Elapsed: 00:00:05.14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6345 Card=9275 Bytes
    =204050)
    1 0 SORT (UNIQUE) (Cost=6345 Card=9275 Bytes=204050)
    2 1 INDEX (FULL SCAN) OF 'EVENT_NA_TIME_ETYPE' (NON-UNIQ
    UE) (Cost=12878 Card=2284254 Bytes=50253588)
    4/3
    Elapsed: 00:00:09.70
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6596 Card=9316 Bytes
    =204952)
    1 0 SORT (UNIQUE) (Cost=6596 Card=9316 Bytes=204952)
    2 1 INDEX (FULL SCAN) OF 'EVENT_NA_TIME_ETYPE' (NON-UNIQ
    UE) (Cost=11696 Card=2409400 Bytes=53006800)
    Statistics
    0 recursive calls
    0 db block gets
    11933 consistent gets
    9676 physical reads
    724 redo size
    467 bytes sent via SQL*Net to client
    503 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    3 rows processed
    4/4
    Elapsed: 00:00:17.99
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6681 Card=9421 Bytes
    =207262)
    1 0 SORT (UNIQUE) (Cost=6681 Card=9421 Bytes=207262)
    2 1 INDEX (FULL SCAN) OF 'EVENT_NA_TIME_ETYPE' (NON-UNIQ
    UE) (Cost=12110 Card=2433800 Bytes=53543600)
    Statistics
    0 recursive calls
    0 db block gets
    12279 consistent gets
    9423 physical reads
    2608 redo size
    467 bytes sent via SQL*Net to client
    503 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    3 rows processed
    SQL> select index_name,clustering_factor,blevel,leaf_blocks,distinct_keys from u ser_indexes where index_name like 'EVENT%';
    INDEX_NAME CLUSTERING_FACTOR BLEVEL LEAF_BLOCKS DISTINCT_KEYS
    EVENT_NA_TIME_ETYPE 2393170 2 12108 2395545
    EVENT_PK 32640 2 5313 2286158
    EVENT_TIME_NDX 35673 2 7075 2394055

  • H2 devide implicit and explicit created indexes by dictionary views?

    For migrating amounts of data it is useful to drop and recreate indexes and referencing constaints. A implicit created index by defining a primary/unique key constraint will be dropped implicitly by dropping the before mentioned constraint. Creating such a constraint after creating an equivalent index with the constraint name will result in an other behaviour. The explicit created index will not be dropped by dropping the referencing primary/unique key constraint.
    So far so good and well known. The question is: Which dictionary view columns will show me the difference between implicit and explict created indexes if I try to dynamically drop and recreate indexes and unique / primary key constraints?

    Oracle Version is always helpful in answering questions, but for 9i you can find the system generated by:
    dba_indexes.generated = 'Y'
    or
    'SYS_' naming convention for system generated indexes
    or
    dba_constraints.constraint_name = dba_constraints.index_name
    Hope this helps - JTommaney

  • What happens to Existing index after table partition and created with local index

    Hi guys,
    desc part id  number, name  varchar2(100), salary  number
    In an existing table  PART  i am  adding 1 more column DATASEQ NUMBER. i am asked to partition the table part based on dataseq.now the table is created with this logic
    create table part( id  number, name  varchar2(100), salary  number, DATASEQ  number) partition by list(dataseq) (partition PART_INITIAL  values (1));
    Suggestionn required. since  the table is partitioned based on DATASEQ i am asked to add local index on dataseq. i have added local index to dataseq create index idx on part(dataseq) LOCAL; Now my question is  already there is existing index is for the column ID and salary.
    1)  IDX for  dataseq is created locally so that it will have partition on each partition on the main table. Please tell me what happens to the existing index on the column ID and salary.. will it again created in local?
    Please suggest
    S

    Hi,
    first of all, in reality "partition a table" means create a new table a migrate existing data there (although theoretically you can use dbms_redefinition to partition an existing table -- however, it's just doing the same thing behind the scenes). This means that you also get to decide what to do with the indexes -- which indexes will be local, which will be global (you can also re-evaluate some of existing indexes and decide that they're not really needed).
    Second of all, the choice of partitioning key looks odd. Partitioning is a data manageability technique more than anything else, so in order to benefit from it you need to find a good partitioning key. A recently added column named "data_seq" doesn't look like a good candidate. Can you provide more details about this column and why it was chosen as a partitioning key?
    I suspect that whoever suggested this partitioning scheme is making a huge mistake. A non-partitioned table is much better in all aspects (including manageability and performance) than wrongly partitioned one.
    Best regards,
    Nikolay

  • How to create index - Fuzzy Matching and Stemming

    Hi,
    I have a problem with creating and index for fuzzy matching and stemming with my expect behavious
    I Have table customer and column sortname. This table ussally contains values in format: "Surname, FirstName"
    "Lenox, Carl"
    "Svensson, Max"
    "Hamlberg, Ulf"
    etc...
    1. Previously I have index created like this:
    CREATE INDEX IX_CUST_TMP_CTXSORTNAME ON CUSTOMER (SORTNAME) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SYNC(ON COMMIT)');
    If I run:
    select * from CUSTOMER where contains(sortname,'Hamlberg') > 0; -- "Hamlberg, Ulf" is returned - OK
    select * from CUSTOMER where contains(sortname,'Ulf') > 0; -- "Hamlberg, Ulf" is returned - OK
    2. I drop the index and create new one for fuzzy matching and stemming
    --NOTE: something is commented out, but I try to run pretty much all the possible varations 
    exec ctx_ddl.create_preference('MYYY_SWEDISH_LEXER', 'BASIC_LEXER');
    --exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'printjoins', '_-');
    --exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'skipjoins', ',');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'index_themes', 'NO');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'index_text', 'YES');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'index_stems', 'SWEDISH');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'alternate_spelling', 'SWEDISH');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'base_letter', 'YES');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'base_letter_type', 'GENERIC');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'override_base_letter', 'TRUE');
    --exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'whitespace', ',');
    exec ctx_ddl.create_preference('MYYY_SWEDISH_FUZZY_PREF', 'BASIC_WORDLIST');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','FUZZY_MATCH','AUTO');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','FUZZY_SCORE','60');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','FUZZY_NUMRESULTS','100');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','SUBSTRING_INDEX','TRUE');
    exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','STEMMER','AUTO');
    create index IX_CUST_TMP_CTXSORTNAME on CUSTOMER (sortname) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('LEXER MYYY_SWEDISH_LEXER Wordlist MYYY_SWEDISH_FUZZY_PREF SYNC(ON COMMIT)');
    If I run:
    select * from CUSTOMER where contains(sortname,'Hamlberg') > 0; -- "Hamlberg, Ulf" is returned - OK
    select * from CUSTOMER where contains(sortname,'Ulf') > 0; -- "Hamlberg, Ulf" is returned - NOT OK - Why it is not returned ??
    3. Then I want to use fuzzy for searching names:
    a. SELECT score(1), sortname FROM CUSTOMER where CONTAINS(sortname, 'fuzzy({Hamlberg}, 50, 10, weight)',1) > 0; - it should return "Hamlberg, Ulf"
    b. SELECT score(1), sortname FROM CUSTOMER where CONTAINS(sortname, 'fuzzy({Ulf}, 50, 10, weight)',1) > 0; - it should return "Hamlberg, Ulf"
    c. SELECT score(1), sortname FROM CUSTOMER where CONTAINS(sortname, 'fuzzy({Hamlberg Ulf}, 50, 10, weight)',1) > 0; - it should return "Hamlberg, Ulf"
    d. SELECT score(1), sortname FROM CUSTOMER where CONTAINS(sortname, 'fuzzy({Hamlberg, Ulf}, 50, 10, weight)',1) > 0; - it should return "Hamlberg, Ulf"
    Is it possible to do that somehow ?
    Thx for answers.
    Edited by: 906314 on 7.3.2012 4:01

    It works fine for me:
    SQL> create table customer (sortname varchar2(40));
    Table created.
    SQL> insert into customer values ('Lenox, Carl');
    1 row created.
    SQL> insert into customer values ('Svensson, Max');
    1 row created.
    SQL> insert into customer values ('Hamlberg, Ulf');
    1 row created.
    SQL> exec ctx_ddl.create_preference('MYYY_SWEDISH_LEXER', 'BASIC_LEXER');
    PL/SQL procedure successfully completed.
    SQL> --exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'printjoins', '_-');
    SQL> --exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'skipjoins', ',');
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'index_themes', 'NO');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'index_text', 'YES');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'index_stems', 'SWEDISH');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'alternate_spelling', 'SWEDISH');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'base_letter', 'YES');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'base_letter_type', 'GENERIC');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'override_base_letter', 'TRUE');
    PL/SQL procedure successfully completed.
    SQL> --exec ctx_ddl.set_attribute('MYYY_SWEDISH_LEXER', 'whitespace', ',');
    SQL>
    SQL> exec ctx_ddl.create_preference('MYYY_SWEDISH_FUZZY_PREF', 'BASIC_WORDLIST');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','FUZZY_MATCH','AUTO');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','FUZZY_SCORE','60');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','FUZZY_NUMRESULTS','100');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','SUBSTRING_INDEX','TRUE');
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('MYYY_SWEDISH_FUZZY_PREF','STEMMER','AUTO');
    PL/SQL procedure successfully completed.
    SQL>
    SQL> create index IX_CUST_TMP_CTXSORTNAME on CUSTOMER (sortname) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('LEXER MYYY_SWEDISH_LEXER Wordlist
    MYYY_SWEDISH_FUZZY_PREF SYNC(ON COMMIT)');
    Index created.
    SQL> select * from CUSTOMER where contains(sortname,'Hamlberg') > 0;
    SORTNAME
    Hamlberg, Ulf
    SQL> select * from CUSTOMER where contains(sortname,'Ulf') > 0;
    SORTNAME
    Hamlberg, Ulf
    SQL> SELECT score(1), sortname FROM CUSTOMER where CONTAINS(sortname, 'fuzzy({Hamlberg}, 50, 10, weight)',1) > 0;
      SCORE(1) SORTNAME
            44 Hamlberg, Ulf
    SQL> SELECT score(1), sortname FROM CUSTOMER where CONTAINS(sortname, 'fuzzy({Ulf}, 50, 10, weight)',1) > 0;
      SCORE(1) SORTNAME
            44 Hamlberg, Ulf
    SQL> SELECT score(1), sortname FROM CUSTOMER where CONTAINS(sortname, 'fuzzy({Hamlberg Ulf}, 50, 10, weight)',1) > 0;
      SCORE(1) SORTNAME
            44 Hamlberg, Ulf
    SQL> SELECT score(1), sortname FROM CUSTOMER where CONTAINS(sortname, 'fuzzy({Hamlberg, Ulf}, 50, 10, weight)',1) > 0;
      SCORE(1) SORTNAME
            44 Hamlberg, UlfIs this different from what you see? If so, please show a complete session (as I have) so we can check you're not doing anything wrong.
    I don't understand your:
    select * from CUSTOMER where contains(sortname,'Ulf') > 0; -- "Hamlberg, Ulf" is returned - NOT OK - Why it is not returned ??
    Do you mean "why is it returned?" It's because the "contains" operator matches any word in the original text. That's the whole point of it.

  • IWeb '09 and creating an "Index" page for two separate sides of my website

    I'm redesigning my website with iWeb '09 seeing that I've recently switched to Mac from being a life-long PC/Windows user. I'm not too web programming savvy so iWeb fits my needs as a very good program that redesigns my site very nicely (and quite inexpensively, as well).
    My current incarnation of my website (http://www.jeffreykern.com) was designed by a professional web designer on Dreamweaver for PC a couple of years ago. Some time ago when I was trying to update my PC with XP SP 3 (bad idea as it turned out), my connection to my web hosting service got completely fouled up and I lost the ability to update the site and haven't updated my site since. Knowing that I was going to be switching to Mac (with my new Mac Pro) I never had the desire, or energy, to patch things up to update my site with my PC. Plus, I was in need of a redesign so I eventually got my site ready to go with iWeb 09. That's where I stand right now...
    So, as you can see on my current site I have a main index page that splits up into the two sides of my life: the triathlete side and the writer side. I've already redesigned both sides of my site with iWeb, I'm ready to update it thru my web hosting via FTP and Transmit 3, but I cannot find how to create a main "Index" page on iWeb that will let me branch off into two different directions. By having that "Index" page intact I will be able to keep my domain of jeffreykern.com as it currently stands. I don't mind having to get two different domains for each of my two sides of my site but would like to avoid that extra step -- if, at all, possible.
    Thanks in advance for your help,
    Jeff

    Building three websites on three separate domain files would be my choice.
    Its important to realize that you cannot have a page called "index" using iWeb because the associated index.html file will conflict with the one that iWeb creates.
    As has been suggested, the first site would be one page. The site name would be jeffreykern.
    This site will publish as jeffreykern_files and an index.html file. Inside this folder is another index.html file. This is the one your domain name will be directed at if you don't need an RSS feed.
    If your server allows it, create a root folder on it called "jeffreykern" and upload the contents of the local folder to this and ignore the separate index.html file. Note that I said contents and not the folder itself.
    A lot of servers require that you upload to a pre existing folder. In this case you will have to upload the index.html file and the jeffreykern _files folder.
    The two other sites are named and published as writer and triathlete. The external index files of these two sites are renamed writer.html and triathlete.html.
    These two files and their corresponding folders are uploaded to your root folder on the server after adding tags and optimizing.......
    http://www.iwebformusicians.com/SearchEngines/SEO.html
    Now you have a main (one page) site with two sub sites.
    The domain name http://www.jeffreykern.com/ is directed at the index.html file so that when this is entered into the browser, the main page will appear.
    The links to the two main sections, whether they be text and/or image, are created and selected as external hyperlinks.
    http://www.jeffreykern.com/triathlete/
    http://www.jeffreykern.com/writer/
    Clicking these links will open the first page of their respective sites.
    If you do the sensible thing and trash the iWeb default navigation to replace it with a custom one, you can include external hyperlinks to the landing page and the other site in this.
    The website - iWeb for Musicians - is created like this and is built on 9 separate domain files for ease of updating and publishing. The whole site is tied together with a Main navigation to get to each section which has a Sub navigation to jump around that section.
    For more on navigation see.....
    http://www.iwebformusicians.com/WebMusic/Navigation.html
    Also refer to Fonts, Colors and Navigation on this page ......
    http://www.iwebformusicians.com/WebMusic/iWebandInternetExplorer.html

  • Creating Index in Procedure and defined variables

    Hallo,
    I have a procedure and in this I want to create a Index. The table in which I want to create the index in I have defined with a variable.
    The variables I have declared before.
    CREATE OR REPLACE PROCEDURE PROCEDURE_NAME
    IS
    -- variables
    sql_STMT VARCHAR2(4000);
    BEGIN
    -- do something
    SQL_STMT := 'CREATE INDEX XYZ_IX ON &TABLE_XYZ(GEO) INDEXTYPE IS MDSYS.SPATIAL_INDEX';
         EXECUTE IMMEDIATE SQL_STMT;
    END;
    And I get this error message:
    CALL PROCEDURE_NAME()
    FEHLER in Zeile 1:
    ORA-29855: Fehler bei Ausf³hrung der Routine ODCIINDEXCREATE
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in R-tree: [mdrcrtscrt]
    ORA-13231: Index-Tabelle [MDRT_25CEB$] konnte wõhrend Erstellen von R-Baum nicht
    erstellt werden
    ORA-13249: Stmt-Execute Failure: CREATE TABLE MDRT_25CEB$ (NODE_ID NUMBER
    , NODE_LEVEL NUMBER, INFO BLOB) LOB (INFO) STORE AS (CACHE) NOLOGGING PCTFREE
    2
    ORA-29400: Data Cartridge-Fehler
    ORA-01031: Nicht ausreichende Berechtigungen
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_10I", Zeile 10
    ORA-06512: in "STREET_SEGMENT", Zeile 65
    So what is wrong? I can not see the error.
    Kind Regards and thanks

    The user executing this procedure should have explicit create table and create view privileges.
    This is required if the index is created via the procedure even though these explicit privileges are not required
    when the index is created directly in SQL.
    siva

Maybe you are looking for