Professional Documents
Culture Documents
Rui Wang
In the past weeks, I have been challenging with the issue of creating domain index on one of our
production databases. The problem we were experiencing is that host memory has been eaten up
on searchable_attribute (attribute_text)
indextype is ctxsys.context
storage ctxsys.vista_def_storage
lexer ctxsys.vista_default_lexer
wordlist ctxsys.vista_def_wordlist
memory 1024M
stoplist ctxsys.default_stoplist')
parallel 4;
The script above was sent by application vendor and we were told that the creation of this domain
index takes from 24 hours to 48 hours depending the size of indexable data. But we were still
shocked by the enormous resource (CPU and Memory) consumption it introduced. After testing on
our development database, we realized that our server is unaffordable for it. And then, we simply
reduced the memory to 256M from 1024M and also disabled parallel parameter by changing degree
on searchable_attribute (attribute_text)
indextype is ctxsys.context
lexer ctxsys.vista_default_lexer
wordlist ctxsys.vista_def_wordlist
memory 256M
stoplist ctxsys.default_stoplist')
parallel 1;
My attempt to create domain index with new setting seemed working even though it’s still
me uncomfortable. Eventually, the domain index was created successfully and the whole process
took 44 hours.
Upon the success on development server, I took it for grant that we are going to get it done for sure.
Unfortunately, I was surprised the memory consumption was increasing crazily. Only 30 minutes
after the sql statement was started, the host memory utility hit over 95%, which pushed me to kill
that process in no time. If there no exceptional issue, the index creation should be quite smooth
because we got success on development server and the production server is much more powerful the
development one both on speed and number of CPU, and size of memory.
To figure out the possible reasons which resulted in that, I completed the following comparison
But, the above comparison couldn’t give me a light because there is no difference between two
databases. It also made sense to me because the development database was duplicated from
My persistent attempt to create index by changing parameter of memory and parallel kept causing
memory problem. The typical appearance looks like below while we monitored this process with
The SIZE column kept increasing crazily and shortly hit over 10G. Checking with PGA_ALLOC_MEM
also showed that the threshold of 10G. And then, I didn’t hesitate to contact oracle support for it
With acceptable delay, Oracle Support showed the finding in alert log file (listed below) and
indicated that it’s a bug which could be eliminated by applying patch 7706062.
ORA-00600: internal error code, arguments: [17087], [0x3BF7F0918], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [17087], [0x3BF7F0918], [], [], [], [], [], []
I believed we’ll be benefit from applying that patch. Unfortunately, the downtime of all oracle
services on production server is not acceptable because we have more than one oracle production
databases sitting on that server. What I’m thinking is that I won’t do that unless I exhausted all
possible attempts on application level. My further attempts showed that creating domain index with
parameter PARALLEL at this case very likely trigger the known bug as Oracle Support mentioned.
Further investigation
The next investigation I conducted is on Unix level. I would like to make sure if required OS
packages have been installed properly, especially the UTF8 related ones, because this domain index
is created upon UTF8-based data set. To do this kind of checking, one of the best tool we can use is
Database 10g R2 (10.2.0) Preinstall (Solaris)” and found that two of oracle required OS packages
Besides, one more suspicious OS package (SUNWeuluf UTF-8 L10N For Language Environment User
Files) was found missing on production server. Unfortunately, adding these three OS packages
only didn’t bring any luck to me. The memory problem was still there.
My further research on domain index came across the following informative articles and official
oracle documents.
As stated, “Oracle Text index is ‘DOMAIN’ index, oracle provided INDEXTYPE build using Extensible
Indexing framework. Text index is not singe object in database, it is implemented using number of
underlying ‘normal’ tables and indexes.” I then realized that we might can get help from “SQL
Access Advisor” and “SQL Tuning Advisor” via Oracle Enterprise Manager. Afterwards, I was guided
to table CTXSYS.DR$INDEX_ERROR. This table is actually log table for index creation. One of
problem we had with this table is that the data inside is stale and I analyzed this table by following
recommendation from “SQL Access Advisor”. Another significant error I noticed is that CTXSYS has
Finally, the sql statement I decided to use is listed below with explicitly setting NOPARALLEL instead
of PARALLEL 1.
on searchable_attribute (attribute_text)
indextype is ctxsys.context
storage ctxsys.vista_def_storage
lexer ctxsys.vista_default_lexer
wordlist ctxsys.vista_def_wordlist
memory 256M
stoplist ctxsys.default_stoplist')
NOPARALLEL;
It’s unbelievable that it seemed working because the memory consumed was not increasing crazily
and it did increase by 2M gradually. And, it stopped growing once it hit around 1.7 GB. (monitored
by OS command prstat) That’s exact size of memory used while I created same index on
development database. Next, there is no any exceptional issue about the creation of domain index
and it eventually finished in 28 hours. The success of index creation was then approved by the
Well done!!
analyzing database objects, granting privileges, adjusting preference parameters, and increasing
database init parameter, help me out indeed? The answer probably is NOT because we got success
on development database without doing these. Let me recall what else I did additionally.
That’s it. One more thing I did right before the successful attempt is that I ever try to simply rebuild
domain index with following sql statement after I killed the problematical process again.
If the process to create domain index is killed while it’s still underway, the index status should be
in-progress state. I did get success with this “alter index rebuild” statement upon the in-progress
index. But, without setting other parameters, this index was not the one I’m really going to create.
After issuing this index rebuild statement, I then followed the standard cycle to create this
Is this rebuilding attempt key point in guiding me to success? It’s very likely.
Did this approach avoid triggering that bug issue? Definitely possible.
All above actions have been done within the same session without exiting. It looks like the clause
“resume memory 2M” of “alter index … rebuild” statement stopped the “memory leaks” and kept
To be continued