View Full Version : why so slowly?
rabbit
10-28-2003, 02:22 PM
Hi all,
i want to creat a context index for clob column in oracle text. 2 MB
files(pdf, doc, xls, ppt, htm) are stored in this column. But it is
very slowly. I must c.a. 7 hours wait until index is created. I think,
it is not not correct. I set the Preferenz in such a way with java.
//lexer
cstmt = conn.prepareCall("{call ctx_ddl.create_preference(?, ?)}");
cstmt.setString(1, "oracle_lexer_extern");
cstmt.setString(2, "BASIC_LEXER");
cstmt.execute();
cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}");
cstmt.setString(1, "oracle_lexer_extern");
cstmt.setString(2, "base_letter");
cstmt.setString(3, "yes");
cstmt.execute();
cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}");
cstmt.setString(1, "oracle_lexer_extern");
cstmt.setString(2, "index_stems");
cstmt.setString(3, "german");
cstmt.execute();
cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}");
cstmt.setString(1, "oracle_lexer_extern");
cstmt.setString(2, "printjoins");
cstmt.setString(3, "_-");
cstmt.execute();
//wordlist
cstmt = conn.prepareCall("{call ctx_ddl.create_preference(?, ?)}");
cstmt.setString(1, "oracle_wordlist_extern");
cstmt.setString(2, "BASIC_WORDLIST");
cstmt.execute();
cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}");
cstmt.setString(1, "oracle_wordlist_extern");
cstmt.setString(2, "stemmer");
cstmt.setString(3, "German");
cstmt.execute();
cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}");
cstmt.setString(1, "oracle_wordlist_extern");
cstmt.setString(2, "fuzzy_match");
cstmt.setString(3, "German");
cstmt.execute();
cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}");
cstmt.setString(1, "oracle_wordlist_extern");
cstmt.setString(2, "substring_index");
cstmt.setString(3, "true");
cstmt.execute();
cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}");
cstmt.setString(1, "oracle_wordlist_extern");
cstmt.setString(2, "prefix_index");
cstmt.setString(3, "true");
cstmt.execute();
String index_str = "CREATE INDEX oracle_index_extern ON
texttable_intern(content) INDEXTYPE IS ctxsys.context PARAMETERS('
DATASTORE CTXSYS.DIRECT_DATASTORE
FILTER CTXSYS.INSO_FILTER format column text_typ
LEXER oracle_lexer_extern
WORDLIST oracle_wordlist_extern')";
stmt.execute(index_str);
Is it correct? If ja, what's wrong with the creating index? Can you
tell me? (I use Oracle 9i under windows server 2003)
Thank you very much and greeting aus germany!
rabbit
Niall Litchfield
10-29-2003, 02:07 AM
7 hours seems an excessively long time for index creation I agree.On the
other hand trying to do this through Java rather than as part of schema
creation using SQL seems remarkably daft as well. What happens if you use
good old sqlplus?
--
Niall Litchfield
Oracle DBA
Audit Commission Uk
"rabbit" <zhoudiwen@hotmail.com> wrote in message
news:6a950fe.0310281422.12b8091e@posting.google.com... Hi all, i want to creat a context index for clob column in oracle text. 2 MB files(pdf, doc, xls, ppt, htm) are stored in this column. But it is very slowly. I must c.a. 7 hours wait until index is created. I think, it is not not correct. I set the Preferenz in such a way with java. //lexer cstmt = conn.prepareCall("{call ctx_ddl.create_preference(?, ?)}"); cstmt.setString(1, "oracle_lexer_extern"); cstmt.setString(2, "BASIC_LEXER"); cstmt.execute(); cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}"); cstmt.setString(1, "oracle_lexer_extern"); cstmt.setString(2, "base_letter"); cstmt.setString(3, "yes"); cstmt.execute(); cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}"); cstmt.setString(1, "oracle_lexer_extern"); cstmt.setString(2, "index_stems"); cstmt.setString(3, "german"); cstmt.execute(); cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}"); cstmt.setString(1, "oracle_lexer_extern"); cstmt.setString(2, "printjoins"); cstmt.setString(3, "_-"); cstmt.execute(); //wordlist cstmt = conn.prepareCall("{call ctx_ddl.create_preference(?, ?)}"); cstmt.setString(1, "oracle_wordlist_extern"); cstmt.setString(2, "BASIC_WORDLIST"); cstmt.execute(); cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}"); cstmt.setString(1, "oracle_wordlist_extern"); cstmt.setString(2, "stemmer"); cstmt.setString(3, "German"); cstmt.execute(); cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}"); cstmt.setString(1, "oracle_wordlist_extern"); cstmt.setString(2, "fuzzy_match"); cstmt.setString(3, "German"); cstmt.execute(); cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}"); cstmt.setString(1, "oracle_wordlist_extern"); cstmt.setString(2, "substring_index"); cstmt.setString(3, "true"); cstmt.execute(); cstmt = conn.prepareCall("{call ctx_ddl.set_attribute(?, ?, ?)}"); cstmt.setString(1, "oracle_wordlist_extern"); cstmt.setString(2, "prefix_index"); cstmt.setString(3, "true"); cstmt.execute(); String index_str = "CREATE INDEX oracle_index_extern ON texttable_intern(content) INDEXTYPE IS ctxsys.context PARAMETERS(' DATASTORE CTXSYS.DIRECT_DATASTORE FILTER CTXSYS.INSO_FILTER format column text_typ LEXER oracle_lexer_extern WORDLIST oracle_wordlist_extern')"; stmt.execute(index_str); Is it correct? If ja, what's wrong with the creating index? Can you tell me? (I use Oracle 9i under windows server 2003) Thank you very much and greeting aus germany! rabbit
Daniel Morgan
10-29-2003, 08:30 AM
Niall Litchfield wrote:
7 hours seems an excessively long time for index creation I agree.On theother hand trying to do this through Java rather than as part of schemacreation using SQL seems remarkably daft as well. What happens if you usegood old sqlplus?
Well if you're getting paid by the hour the job is worth less for one
thing. ;-)
--
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.