Optimization taking more and more time each day [message #463188] |
Wed, 30 June 2010 02:30 |
leon_buijsman
Messages: 13 Registered: March 2009 Location: Rotterdam
|
Junior Member |
|
|
We are running a batch job to fully optimize the OracleText index each night. When we released it, it took 80 minutes to run a stats report, do the optimization, run a second stats report.
This is the resulting end report:
OPTIMISATION PROCESS
---------------------------------------------------------------------
started : 29-JUN-10
elapsed time : 157 minutes and -15 seconds
INDEX GENERIC STATS
---------------------------------------------------------------------
unique tokens : 2,069,739
PRE OPTIMISATION STATS SUMMARY
---------------------------------------------------------------------
size : 692,311,627 (660.24 MB)
garbage docs : 249
index rows : 2,515,887
fragmentation : 12 %
POST OPTIMISATION STATS SUMMARY
---------------------------------------------------------------------
size : 691,916,408 (659.86 MB)
garbage docs : 5
index rows : 2,221,628
fragmentation : 0 %
Now comes the problem: each day the report takes much longer to run. Right now almost 2,5 hours per night. The index itself has grown marginally (5% in size per month), but the time for doing the optimization has doubled last month.
Fragmentation is back to 0% after optimization, but did anybody come across a similar issue? And what can we do to speed this up?
|
|
|
|
|
|
|
|
|
|
Re: Optimization taking more and more time each day [message #471428 is a reply to message #470393] |
Sat, 14 August 2010 06:47 |
leon_buijsman
Messages: 13 Registered: March 2009 Location: Rotterdam
|
Junior Member |
|
|
Hi Barbara,
I have gone through the document. Rebuilding the $X index was a missed step, but did not make any change.
I started to compare our old textindex (which did run the ctx_report.index_starts in 20 minutes compared to 111 minutes last night on similar size index). That index had one major difference: memory settings. These were set at 500Mb and this is what we ran for the new index (i.e. the max default setting):
ctx_ddl.create_preference('WD_CAND_DOC_LOB_TEXT_STO','BASIC_STORAGE');
ctx_ddl.set_attribute('WD_CAND_DOC_LOB_TEXT_STO','I_TABLE_CLAUSE','tablespace WD_I storage (initial 50M)');
ctx_ddl.set_attribute('WD_CAND_DOC_LOB_TEXT_STO','K_TABLE_CLAUSE','tablespace WD_I storage (initial 50M)');
ctx_ddl.set_attribute('WD_CAND_DOC_LOB_TEXT_STO','R_TABLE_CLAUSE','tablespace WD_I storage (initial 50M) lob (data) store as (cache)');
ctx_ddl.set_attribute('WD_CAND_DOC_LOB_TEXT_STO','N_TABLE_CLAUSE','tablespace WD_I storage (initial 50M)');
ctx_ddl.set_attribute('WD_CAND_DOC_LOB_TEXT_STO','I_INDEX_CLAUSE','tablespace WD_I storage (initial 50M) compress 2');
ctx_ddl.set_attribute('WD_CAND_DOC_LOB_TEXT_STO','P_TABLE_CLAUSE','tablespace WD_I storage (initial 50M)');
ctx_ddl.set_attribute('WD_CAND_DOC_LOB_TEXT_STO','I_ROWID_INDEX_CLAUSE','tablespace WD_I storage (initial 50M)');
...
create index wd_cand_doc_lob_text
on wd_cand_doc_lob (doc_blob)
indextype is ctxsys.context
parameters('
format column ORACLETEXT_FMT
datastore WD_CAND_DOC_LOB_TEXT_DST
filter WD_CAND_DOC_LOB_TEXT_FIL
section group WD_CAND_DOC_LOB_TEXT_SGP
lexer WD_CAND_DOC_LOB_TEXT_LEX
wordlist WD_CAND_DOC_LOB_TEXT_WDL
stoplist WD_CAND_DOC_LOB_TEXT_SPL
storage WD_CAND_DOC_LOB_TEXT_STO
memory 100M
')
I want to increase the memory setting to 500Mb again and tried the following statement (on a mirror server):
ALTER INDEX WD_CAND_DOC_LOB_TEXT REBUILD PARAMETERS ('REPLACE MEMORY 500M');
Seems right, but when I ran the ctx_report.describe_index, it seemed unchanged. Is this the right statement?
|
|
|
|
|
Re: Optimization taking more and more time each day [message #471861 is a reply to message #471752] |
Tue, 17 August 2010 11:31 |
|
Barbara Boehmer
Messages: 9101 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
Did you do:
alter index index_name rebuild
or:
ctx_ddl.optimize_index ('index_name', 'rebuild') ?
The second is what I was trying to suggest instead of:
ctx_ddl.optimize_index ('index_name', 'full')
which is what I understood you had been doing.
Your assumption is correct that it needs to be rebuilt periodically one way or the other.
[Updated on: Tue, 17 August 2010 11:33] Report message to a moderator
|
|
|