This content has been marked as final.
Show 5 replies
-
1. Re: SPARQL Update with Jena Adapter
alwu-Oracle Jun 2, 2013 11:10 PM (in response to martani)Hi,
Could you please cut & paste here the execution plan (from EM)?
Thanks,
Zhe Wu -
2. Re: SPARQL Update with Jena Adapter
martani Jun 4, 2013 2:28 PM (in response to alwu-Oracle)Hi,
I notice this SQL query executed:
And this is the execution plan:DELETE /*+ index(app MODEL_A_IDX) */ FROM MY_SCHEMA.MODEL_TAB_A APP WHERE BITAND (APP."TRIPLE".RDF_M_ID, 79228162514264337593543950335 - 4294967295) / 4294967296 = (CASE WHEN INSTR (:B1, 'g') = 0 THEN 0 ELSE SYS_OP_RAWTONUM ( SUBSTR (:B1, INSTR (:B1, 'g') + 1, INSTR (:B1, '_') - INSTR (:B1, 'g') - 1)) END) AND (APP."TRIPLE".RDF_S_ID) = SYS_OP_RAWTONUM (SUBSTR (:B1, INSTR (:B1, '_') + 1, INSTR (:B1, '_', INSTR (:B1, '_') + 1) - INSTR (:B1, '_') - 1)) AND (APP."TRIPLE".RDF_P_ID) = SYS_OP_RAWTONUM (SUBSTR (:B1, INSTR (:B1, '_', 1, 2) + 1, INSTR (:B1, '_', 1, 3) - INSTR (:B1, '_', 1, 2) - 1)) AND (APP."TRIPLE".RDF_C_ID) = SYS_OP_RAWTONUM (SUBSTR (:B1, INSTR (:B1, '_', 1, 3) + 1, LENGTH (:B1) - INSTR (:B1, '_', 1, 3)))
Notice that we do not have a MODEL_A_IDX index; is this created automatically after a call to SEM_APIS.CREATE_SEM_MODEL?PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------- | 0 | DELETE STATEMENT | | 1 | 59 | 10915 (15)| 00:02:11 | | 1 | DELETE | NDB_TPL_A | | | | | |* 2 | TABLE ACCESS FULL| NDB_TPL_A | 1 | 59 | 10915 (15)| 00:02:11 | -------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter("APP"."SYS_NC00003$"=SYS_OP_RAWTONUM(HEXTORAW(SUBSTR(:B1,I NSTR(:B1,'_',1,3)+1,LENGTH(:B1)-INSTR(:B1,'_',1,3)))) AND "APP"."SYS_NC00006$"=SYS_OP_RAWTONUM(HEXTORAW(SUBSTR(:B1,INSTR(:B1,'_',1 ,2)+1,INSTR(:B1,'_',1,3)-INSTR(:B1,'_',1,2)-1))) AND "APP"."SYS_NC00005$"=SYS_OP_RAWTONUM(HEXTORAW(SUBSTR(:B1,INSTR(:B1,'_')+ 1,INSTR(:B1,'_',INSTR(:B1,'_')+1)-INSTR(:B1,'_')-1))) AND BITAND("APP"."SYS_NC00004$",79228162514264337589248983040)/4294967296=CA SE INSTR(:B1,'g') WHEN 0 THEN 0 ELSE PLAN_TABLE_OUTPUT ----------------------------------------------------------------------------------------------- SYS_OP_RAWTONUM(HEXTORAW(SUBSTR(:B1,INSTR(:B1,'g')+1,INSTR(:B1,'_')-INSTR(:B1,'g')-1))) END )
Thanks. -
3. Re: SPARQL Update with Jena Adapter
alwu-Oracle Jun 5, 2013 11:38 PM (in response to martani)Hi,
You can invoke the rebuildApplicationTableIndex() method against a GraphOracleSem object.
It will re-recreate the index that is critical to delete performance.
Thanks,
Zhe Wu -
4. Re: SPARQL Update with Jena Adapter
martani Jun 7, 2013 5:11 PM (in response to alwu-Oracle)Hi,
Thank you very much for the reply, it works indeed. I can see the index range scan in the execution plan now:
I am wondering if there is a way to create this index (or indexes) using SEM_APIS Package Subprograms?DELETE STATEMENT, GOAL = ALL_ROWS DELETE USER MODEL_A TABLE ACCESS BY INDEX ROWID USER MODEL_A INDEX RANGE SCAN USER MODEL_A_IDX
Thank you. -
5. Re: SPARQL Update with Jena Adapter
alwu-Oracle Jun 7, 2013 5:54 PM (in response to martani)Hi,1 person found this helpful
SEM_APIS package does not have this index creation. The reason is that this index belong more or less to the application area. One can, of course, get the underlying index DDL and run it in SQL*Plus.
Thanks,
Zhe Wu