Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using trigger created by CTXCAT index makes the update takes too long

User_5VCW3Feb 23 2021

Dear all,
I have to update a table but below update query takes 50 sec , is there any other way to enhance this update statement.
mcdoc_recherche t set rdcsearch = 'je etrdémontre' where rdccleintref = 244546 and stamnetabref = 'DOC'
Plan hash value: 1817789086
 
------------------------------------------------------------------------------------------------
| Id | Operation          | Name      | Rows | Bytes | Cost (%CPU)| Time   |
------------------------------------------------------------------------------------------------
|  0 | UPDATE STATEMENT       |         |   1 |  79 |   1  (0)| 00:00:01 |
|  1 | UPDATE           | MCDOC_RECHERCHE |    |    |      |     |
|  2 |  TABLE ACCESS BY INDEX ROWID| MCDOC_RECHERCHE |   1 |  79 |   1  (0)| 00:00:01 |
|* 3 |  INDEX UNIQUE SCAN     | MC_RDC_U04   |   1 |    |   1  (0)| 00:00:01 |
------------------------------------------------------------------------------------------------
 
Predicate Information (identified by operation id):
---------------------------------------------------
 
  3 - access("RDCCLEINTREF"=244546 AND "STAMNETABREF"='DOC')

There is a trigger DR$MC_RDC_C01TC that might be the problem of this slowness
create or replace trigger "UQAMPF"."DR$MC_RDC_C01TC" after insert or update on "UQAMPF"."MCDOC_RECHERCHE" for each row declare  reindex boolean := FALSE;  updop  boolean := FALSE; begin  ctxsys.drvdml.c_updtab.delete;  ctxsys.drvdml.c_numtab.delete;  ctxsys.drvdml.c_vctab.delete;  ctxsys.drvdml.c_rowid := :new.rowid;  if (inserting or updating('RDCSEARCH') or    :new."RDCSEARCH" <> :old."RDCSEARCH") then   reindex := TRUE;   updop := (not inserting);   ctxsys.drvdml.c_text_vc2 := :new."RDCSEARCH";  end if;  ctxsys.drvdml.ctxcat_dml('UQAMPF','MC_RDC_C01', reindex, updop); end;
The trigger is automatically created as soon as we create the index , I have tested in dev :

trigger enabled : 1,623 second
trigger disabled:0,053 second
I'm just wondering do we have to call this trigger or can we just disable it in Oracle Text context?

index creation:
CREATE INDEX "UQAMPF"."MC_RDC_C01" ON "UQAMPF"."MCDOC_RECHERCHE" ("RDCSEARCH") 
  INDEXTYPE IS "CTXSYS"."CTXCAT" PARAMETERS ('lexer sof_lexer wordlist sof_WDL stoplist UQ_VIDE');

objects created as a result of the index creation
SELECT object_type, object_name
FROM  user_objects
WHERE object_name LIKE '%MC_RDC_C01%'

TABLE DR$MC_RDC_C01$I
INDEX DR$MC_RDC_C01$R
INDEX DR$MC_RDC_C01$X
TRIGGER DR$MC_RDC_C01TC
INDEX MC_RDC_C01

As of for the trigger:

trigger "UQAMPF"."DR$MC_RDC_C01TC" 
  after insert or update on "UQAMPF"."MCDOC_RECHERCHE" 
declare   
  reindex boolean := FALSE;   
  updop   boolean := FALSE; 
begin   
  ctxsys.drvdml.c_updtab.delete;   
  ctxsys.drvdml.c_numtab.delete;
  ctxsys.drvdml.c_vctab.delete;   
  ctxsys.drvdml.c_rowid := :new.rowid;   
  if (inserting or updating ('RDCSEARCH') 
      or :new."RDCSEARCH" <> :old."RDCSEARCH") 
  then     
    reindex := TRUE;     
    updop := (not inserting);     
    ctxsys.drvdml.c_text_vc2 := :new."RDCSEARCH";   
  end if;   
  ctxsys.drvdml.ctxcat_dml ('UQAMPF','MC_RDC_C01', reindex, updop); 
end;

The trigger is created automatically when I create an index of type conctext.ctxcat, and if I drop the trigger the index won't be maintained. If it's taking that long to do that update
I don't know if it's possible to delay re-synching a ctxcat index or define it with manual re-sync
Any suggestions to fix the issue?
Thanks.

Comments

2827010
Why do you want to use portlets based upon ADF?
Why not just expose them as taskflows. There are many drawbacks from using ADF Portlets like iframe rendering, performance, page size increase,...
878913
Hi Yannick,

Thanks for ur reply can you pls tell me how to expose them as a taskflows.....

can you pls tell me the procedure...? or any links related to this task


Thanks.
Daniel Merchán
Hi.

To work with Task Flow you have to create "Bounded Task Flow" that can be integrated with WebCenter Portal.

To build reusable bounded Task Flow I recommend you follow next steps:
- Create a Fusion Web Application in JDeveloper separate of Portal Application to develop.
- Create in the Fusion Web Application your Bounded Task Flow and test it independetly if it's possible.
- Create an ADF JAR Library of you Fusion Web Application and integrate it to your WebCenter Portal (as internal library or deployed shared lib).
- Add your Task Flow to your Resource Catalog.

Links that can help you to achieve your purpose:
- Yannick Ongena Blog about build and expose TF (http://yonaweb.be/webcenter_tutorial/part_6_building_taskflow_and_consuming_it_webcenter_portal)
- My own blog (in spanish) talking about 3 ways to integrate your ADF JAR Library in a WebCenter Portal Project (http://danielmerchanoracle.blogspot.com/2011/08/integrar-adf-task-flows-propios-en-una.html).
- Also if you search in google about ADF Task Flow and Bounded Task Flow and how to reuse you will find a lot of tutorials like http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe11jdev/ps1/boundedtaskflow/bounded_task_flow.html and more...

I hope this help you.

Regards.
878913
Hi Daniel,

Thanks for reply the information you were given on task flows in web center portal its working fine ...

But i want to use same task flow in web center spaces.

Please tell me the procedure for taskflows using in web center spaces...


Thanks Daniel...
Daniel Merchán
Hi.

My recommendation is to deploy your ADF JAR Library as shared-lib in WebLogic. Is the best way to reuse the same lib between WebCenter Portal and WebCenter Spaces.

If you worked extending WebCenter Spaces you know that it works with shared-lib to add the new functionallity.
You can do the same with WebCenter Portal.

Then follow next steps:
1) Create your Task Flow inside of the Fusion Web Application.
2) Create ADF JAR Library from your Fusion Web Application.
3) Depending of Portal or Spaces:
- WebCenter Portal: Add your library to Portal classpath (following the links that I shared) but configure your deployment option to not deploy this library. Follow a guide of how to deploy your ADF JAR library as shared lib in WebLogic. Register the shared-lib in your weblogic.xml and redeploy your Portal Application.
- WebCenter Spaces: Register your shared-lib in weblogic.xml and redeploy WebCenter Spaces using the scripts. Or add your libraries to the default shared-lib that deploy the scripts.

This guides will help you to deploy your code in WebCenter Spaces
http://www.oracle.com/technetwork/middleware/webcenter/portal/owcs-ps5-wcs-ext-samples-wp-1423852.pdf (Samples)
http://docs.oracle.com/cd/E23943_01/webcenter.1111/e10148/jpsdg_wcsres.htm (Understand how Spaces works)

I hope this help you.

Edited by: Daniel Merchán on 12-mar-2013 10:20
1 - 5

Post Details

Added on Feb 23 2021
0 comments
487 views