Thread: Context index creation - 5 million rows, dramatic slowdown


Permlink Replies: 3 - Pages: 1 - Last Post: Feb 21, 2007 4:49 AM Last Post By: DomBrooks
DomBrooks

Posts: 925
Registered: 03/12/00
Context index creation - 5 million rows, dramatic slowdown
Posted: Feb 7, 2007 2:14 AM
Click to report abuse...   Click to reply to this thread Reply
Hi,

I'm wondering what I can do to speed up the creation of a context index.
The target table contains five million rows.
This index is using a multi column datastore across three columns, one of which is a CLOB.
Tailing the index creation logs, initially each parallel process was indexing 100 documents every six seconds but as more documents have been indexes, so the index rate has decreased.
Currently, the index creation has been running for six days (!!!!), they've indexed four million out of the five million rows but the index creation has slowed to such an extent that for each parallel process it takes one minute to index 100 documents.

This is a standalone development database with no other activity against it and with no updates happening against it.
If I set the table to NOLOGGING then I could get some increase in index creation speed but I would not be able to do that on release into production so there seems little point in me doing that.

There doesn't seem to be a definitive reference to this sort of tuning.

I had initially set the index creation to be done in parallel based on a 2 dual core CPUs and had increased the amount of memory that the index creation could use.

This my initial index creation:

CREATE INDEX i_search_ctx01
ON search_demo(ctx_search_multistore_column)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS
('LEXER my_lexer
STORAGE my_storage
DATASTORE my_datastore
SECTION GROUP my_section
FILTER CTXSYS.NULL_FILTER
STOPLIST CTXSYS.EMPTY_STOPLIST
TRANSACTIONAL
SYNC (EVERY "SYSDATE+1/24")
MEMORY 250M')
PARALLEL 4;

Any thoughts?
Barbara Boehmer

Posts: 2,829
Registered: 04/28/00
Re: Context index creation - 5 million rows, dramatic slowdown
Posted: Feb 7, 2007 8:58 AM   in response to: DomBrooks in response to: DomBrooks
Click to report abuse...   Click to reply to this thread Reply
You might check out the following section and see if anything there helps:

http://download-west.oracle.com/docs/cd/B19306_01/text.102/b14217/aoptim.htm#sthref779

mfaisal2

Posts: 57
Registered: 01/10/01
Re: Context index creation - 5 million rows, dramatic slowdown
Posted: Feb 15, 2007 8:24 PM   in response to: DomBrooks in response to: DomBrooks
Click to report abuse...   Click to reply to this thread Reply
Tailing the index creation logs, initially each
parallel process was indexing 100 documents every six
seconds but as more documents have been indexes, so
the index rate has decreased.
Currently, the index creation has been running for
six days (!!!!), they've indexed four million out of
the five million rows but the index creation has
slowed to such an extent that for each parallel
process it takes one minute to index 100 documents.

In the index creation log file you will notice that first the index is created in memory until it reaches the indexing memory limit, flushes it to disk ($I table), and continue to index more documents in memory, and so on. So basically the entire indexing task is broken up into smaller batches (depending on the size of the indexing memory you have set) and each batch is processed in two stages, the in-memory indexing and the flush to disk.

Looking at the index creation log, Is the degradation in indexing performance limited to in-memory indexing stage or to the disk flush stage or both?

If it is limited to in-memory indexing stage then you might be hitting a memory leak bug which you can prove by taking PGA dumps and validating that some sub-heap is growing uncontrollably.

Faisal
DomBrooks

Posts: 925
Registered: 03/12/00
Re: Context index creation - 5 million rows, dramatic slowdown
Posted: Feb 21, 2007 4:49 AM   in response to: mfaisal2 in response to: mfaisal2
Click to report abuse...   Click to reply to this thread Reply
Hi Faisal,

Thanks for your reponse.

Looking at the log files, the degradation in indexing performance IS limited to the in-memory indexing stage and the disk flush stage seems to remain pretty constant.

I will look into how to do some "PGA dumps" when I re-run this shortly.

Cheers,
Dominic.
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums