473,394 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Function Based Index and java.lang.String

Hi.

I have a java stored procedure whose spec is as follows:

CREATE OR REPLACE FUNCTION DECODE_SEQUENCE(SEQUENCE VARCHAR2) RETURN
VARCHAR2
DETERMINISTIC
AS LANGUAGE JAVA
NAME 'kr.ac.dke.protein.compression.SequenceCompressor. decode(java.lang.String)
return java.lang.String';
/

AND I want to make an index like below:

CREATE INDEX K0_IDX ON K0(DECODE_SEQUENCE(TYPESTR), TYPELEN)
NOLOGGING
COMPRESS 2
/

However, above statement raises an error, saying that 'Maximum size of
index field is excceded.' Hence, I've changed the index creation
statement.

CREATE INDEX K0_IDX ON K0(SUBSTR(DECODE_SEQUENCE(TYPESTR),1,1),
TYPELEN)
NOLOGGING
COMPRESS 2
/

This works.

Here's the question. Can't I create an index on java.lang.String
without using SUBSTR function?

Regards,
Minkoo Seo
Jul 19 '05 #1
1 4594

"Min-Koo Seo" <po******@hanmail.net> wrote in message
news:4c**************************@posting.google.c om...
Hi.

I have a java stored procedure whose spec is as follows:

CREATE OR REPLACE FUNCTION DECODE_SEQUENCE(SEQUENCE VARCHAR2) RETURN
VARCHAR2
DETERMINISTIC
AS LANGUAGE JAVA
NAME 'kr.ac.dke.protein.compression.SequenceCompressor. decode(java.lang.String) return java.lang.String';
/

AND I want to make an index like below:

CREATE INDEX K0_IDX ON K0(DECODE_SEQUENCE(TYPESTR), TYPELEN)
NOLOGGING
COMPRESS 2
/

However, above statement raises an error, saying that 'Maximum size of
index field is excceded.' Hence, I've changed the index creation
statement.

CREATE INDEX K0_IDX ON K0(SUBSTR(DECODE_SEQUENCE(TYPESTR),1,1),
TYPELEN)
NOLOGGING
COMPRESS 2
/

This works.

Here's the question. Can't I create an index on java.lang.String
without using SUBSTR function?

Regards,
Minkoo Seo


It doesn't know how large a key is and a key cannot be larger than half a db
block. But with substring the key cannot exceed half a database block.
Jim
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
6
by: Patrick | last post by:
Hello all! I am porting an application from C++ to Java and have run into a problem using the DataInputStream reader object. The file I am trying to read in is anywhere from 20 to 60 MB and has a...
6
by: D | last post by:
Hello all...I have an issue with one of my java script functions that I'm hoping someone can easily help with. I have a web based application that we use to create/sign up for overtime. When we...
0
by: snkssa | last post by:
Hi, I got the following error while building an application with ant. please can you give the solution or reason why it is failing? Thank you create_zip_linux: ...
0
by: jaywak | last post by:
Just tried running some code on Linux (2.4.21-32.0.1.EL and Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)) and Windows XPSP2 (with Java HotSpot(TM) Client VM (build...
0
oll3i
by: oll3i | last post by:
package library.common; import java.sql.ResultSet; public interface LibraryInterface { public ResultSet getBookByAuthor(String author); public ResultSet getBookByName(String name);
3
by: jayattarde | last post by:
Hi, While running .jar file I get the following error. Please helpme to sort it out. ption in thread "main" java.lang.NoClassDefFoundError: while resolving class: Cutter at...
6
by: nrperry | last post by:
Hello, I have a question about this error: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -2 I am doing my java development in IBM Rationale...
12
by: Inny | last post by:
Im trying to rewrite a link with a href function. I need to parse a query string within it ('+tid') But all attempts Have falied. The current onclick/ link function <a href="java...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.