This discussion is archived
9 Replies Latest reply: Apr 18, 2012 11:44 AM by sdas RSS

Error while deleting a triple

900576 Newbie
Currently Being Moderated
I am experiencing the following error, while I try to delete a triple from my model:

I am able to insert data into the model, however I recieve the error when I execute the following delete statement:

delete /*+ index(t test_model_tpl_idx) */
from test_model_tpl t
where BITAND( t.triple.rdf_m_id, 79228162514264337593543950335 - 4294967295 ) / 4294967296 = 0 -- Not using a Named Graph
and t.triple.rdf_s_id ='681797856971417497';


ORA-13199: Decr Link Cost (or Del if zeroed) step_num=1 SQLERRM=ORA-01422: exact fetch returns more than requested
number of rows Error during attempt to delete triple: < model_id=9
start_node_id = 681797856971417497 p_value_id=3413820271109615
canon_end_node_id=318394409473957387>
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 9173
ORA-06512: at "MDSYS.TEST_MODEL_DEL", line 22
ORA-04088: error during execution of trigger 'MDSYS.TEST_MODEL_DEL' 13199. 00000- "%s"
*Cause: This is an internal error.
*Action: Contact Oracle Support Services.
Vendor code 13199 Error at Line:72


Previously to this error I ran the sem_apis.remove_duplicates() on our model. After that completed, nothing was being changed in the model, I noticed that the triggers on the application table were 'disabled'. I altered the triggers and enabled the INS, DEL, DML triggers.

Any help would be appriciated.

Thanks
-Michael

Edited by: MichaelB on Apr 18, 2012 11:24 AM
  • 1. Re: Error while deleting a triple
    sdas Journeyer
    Currently Being Moderated
    Michael,

    Could you please send us the result of the following queries:

    select count(*)
    from mdsys.rdfm_<model_name> where model_id=9
    AND start_node_id = 681797856971417497 AND p_value_id=3413820271109615 AND canon_end_node_id=318394409473957387;

    and also
    select * ...

    Thanks
    - Souri.
  • 2. Re: Error while deleting a triple
    900576 Newbie
    Currently Being Moderated
    select count(*)
    from mdsys.rdfm_<model_name> where model_id=9
    AND start_node_id = 681797856971417497
    AND p_value_id=3413820271109615
    AND canon_end_node_id=318394409473957387;

    Result:
    7


    select *
    from mdsys.rdfm_<model_name> where model_id=9
    AND start_node_id = 681797856971417497
    AND p_value_id=3413820271109615
    AND canon_end_node_id=318394409473957387;

    Result:
    3413820271109615     681797856971417497     318394409473957387     5599647613753902704     9     1                                   9_9763B89E1676799_C20D9F89625EF_46B2A074B2A5E0B
    3413820271109615     681797856971417497     318394409473957387     5599647613753902704     9     1                                   9_9763B89E1676799_C20D9F89625EF_46B2A074B2A5E0B
    3413820271109615     681797856971417497     318394409473957387     5599647613753902704     9     1                                   9_9763B89E1676799_C20D9F89625EF_46B2A074B2A5E0B
    3413820271109615     681797856971417497     318394409473957387     5599647613753902704     9     1                                   9_9763B89E1676799_C20D9F89625EF_46B2A074B2A5E0B
    3413820271109615     681797856971417497     318394409473957387     5599647613753902704     9     1                                   9_9763B89E1676799_C20D9F89625EF_46B2A074B2A5E0B
    3413820271109615     681797856971417497     318394409473957387     5599647613753902704     9     1                                   9_9763B89E1676799_C20D9F89625EF_46B2A074B2A5E0B
    3413820271109615     681797856971417497     318394409473957387     5599647613753902704     9     1                                   9_9763B89E1676799_C20D9F89625EF_46B2A074B2A5E0B
  • 3. Re: Error while deleting a triple
    sdas Journeyer
    Currently Being Moderated
    (I am assuming that the G_ID column values were all NULL in the output of the SELECT * query.)

    Could you please run the following to see the status of the B-tree indexes on the model:
    select * from mdsys.sem_network_index_info where name='<model_name>' order by name,type,id,index_code;

    Thanks,
    - Souri.
  • 4. Re: Error while deleting a triple
    900576 Newbie
    Currently Being Moderated
    Yes the "G_ID" column is null for each row of the select * query.


    TEST_MODEL     MODEL     9     CPM     RDF_LNK_CPM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     2     3     242956     71782520     24576038     1     2     61115595     338000     16-APR-12 11.39.26 AM
    TEST_MODEL     MODEL     9     CPSGM     RDF_LNK_CPSGM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     2     3     369452     70170871     70170871     1     1     70091011     70170871     16-APR-12 02.10.39 PM
    TEST_MODEL     MODEL     9     CPSM     RDF_LNK_CPSM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     2     3     359535     70170871     70170871     1     1     70091011     70170871     16-APR-12 01.02.13 PM
    TEST_MODEL     MODEL     9     CSM     RDF_LNK_CSM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     1     3     316222     72361386     65591712     1     1     72037648     269563     16-APR-12 11.39.12 AM
    TEST_MODEL     MODEL     9     CSPGM     RDF_LNK_CSPGM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     1     3     431750     70170871     70170871     1     1     69912236     70170871     16-APR-12 02.24.05 PM
    TEST_MODEL     MODEL     9     CSPM     RDF_LNK_CSPM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     1     3     421860     70170871     70170871     1     1     69912236     70170871     16-APR-12 01.14.05 PM
    TEST_MODEL     MODEL     9     PCSGM     RDF_LNK_PCSGM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     2     3     368150     70568311     70568311     1     1     70565707     216794     16-APR-12 11.38.37 AM
    TEST_MODEL     MODEL     9     PCSM     RDF_LNK_PVIDCENSNMID_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     2     3     359537     70170871     70170871     1     1     70167378     70170871     16-APR-12 12.50.38 PM
    TEST_MODEL     MODEL     9     PSCGM     RDF_LNK_PSCGM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     1     3     381249     70284733     70284733     1     1     70116930     209426     16-APR-12 11.38.51 AM
    TEST_MODEL     MODEL     9     PSCM     RDF_LNK_PSCM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     1     3     370913     70170871     70170871     1     1     69998937     70170871     16-APR-12 12.39.20 PM
    TEST_MODEL     MODEL     9     SCGM     RDF_LNK_SCGM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     1     3     274923     70170887     64145288     1     1     68786099     70170887     16-APR-12 03.35.43 PM
    TEST_MODEL     MODEL     9     SCM     RDF_LNK_SCM_IDX     16-APR-12 03.35.46.093879000 PM -04:00     USABLE     SEM_DATA_INDX     NONUNIQUE     ENABLED     1     3     265085     70170871     64145288     1     1     68786088     70170871     16-APR-12 01.23.44 PM

    I have been experiencing slowness with our queries that we previously were not experiencing. Therefore I have been trying different index combinations to find which indexes the optimizer wants to use and which is the fastest.

    The most recent that I added was SCGM and it appears to be used over the SCM index, and is much faster as well. The default 'STRICT_DEFAULT=T' option is being used in our SEM_MATCH queries as well.

    Thanks.

    Edited by: MichaelB on Apr 18, 2012 12:50 PM
  • 5. Re: Error while deleting a triple
    sdas Journeyer
    Currently Being Moderated
    The PCSGM index is supposed to be a UNIQUE index (and never disabled). That does not seem to be the case here (based on the index status info):

    TEST_MODEL MODEL 9 PCSGM RDF_LNK_PCSGM_IDX 16-APR-12 03.35.46.093879000 PM -04:00 USABLE SEM_DATA_INDX NONUNIQUE ENABLED 2 3 368150 70568311 70568311 1 1 70565707 216794 16-APR-12 11.38.37 AM

    This has allowed duplicate entries to get into the RDF model, which has led to the failure during deletion attempt. (Note: app table can have duplicates, but not the corresponding RDF model.)

    Please let us know if any operation was done to explicitly disable the PCSGM index or drop and re-create it as a nonunique index. If you would like, please send me direct email: souripriya dot das at oracle dot com.

    Thanks,
    - Souri.
  • 6. Re: Error while deleting a triple
    alwu Pro
    Currently Being Moderated
    Hi Michael,

    In addition to what Souri suggested, I have a question regarding "... After that completed, nothing was being changed in the model, I noticed that the triggers on the application table were 'disabled'. I altered the triggers and enabled the INS, DEL, DML triggers..."

    I assume the remove_duplicates call failed? Otherwise, the triggers should be re-enabled after the call.

    If the data in your application table is out of sync with your RDFM_<model-name>, then you may want to dump
    the data out in N-TRIPLES (or quads) and re-load them into a new model.

    Thanks,

    Zhe
  • 7. Re: Error while deleting a triple
    900576 Newbie
    Currently Being Moderated
    Thanks for the assistance. I did not see the remove_duplicates function 'fail', however I did see the triggers disabled, so it must have failed. Does remove_duplicates work to fix this problem?

    I will rebuild the application table and be sure to not disable the PCSGM index (it's possible I ran execute sem_apis.drop_sem_index('PCSGM'); execute sem_apis.add_sem_index('PCSGM');) Would that cause the index to be recreated with NONUNIQUE?
  • 8. Re: Error while deleting a triple
    alwu Pro
    Currently Being Moderated
    Hi,

    If the remove_duplicates did not throw out error messages but triggers were disabled after the call, then it is a bug.
    Please file a bug with a reproducible test case.

    Please follow up with Souri on the indexes.

    Thanks,

    Zhe
  • 9. Re: Error while deleting a triple
    sdas Journeyer
    Currently Being Moderated
    Michael,

    Yes. The sequence of operations, execute sem_apis.drop_sem_index('PCSGM'); execute sem_apis.add_sem_index('PCSGM');, would drop the unique PCSGM index and re-create it as a nonunique index. That is very likely what has happened.

    However, sem_apis.drop_sem_index('PCSGM') should have caused raising of an error disallowing the operation. When you get a chance, please submit a Service Request for this problem.

    Please contact us directly if you need help in rebuilding the model(s) in your semantic network.

    Thanks,
    - Souri.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points