473,385 Members | 1,720 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,385 software developers and data experts.

CLOB and searching by it

Hello all,

I have table with CLOB column length of ~65K. application is searching
from this table by CLOB and i can not create index on it.
I know IBM recommends using DB2 Net Search Extender or DB2 UDB Text
Information Extender for searching CLOBS but what are the other
solutions out there. can i use some other data type and create index
on it ?
any ideas ?

regards,
db2admin
Jun 27 '08 #1
3 7312
db2admin wrote:
Hello all,

I have table with CLOB column length of ~65K. application is searching
from this table by CLOB and i can not create index on it.
I know IBM recommends using DB2 Net Search Extender or DB2 UDB Text
Information Extender for searching CLOBS but what are the other
solutions out there. can i use some other data type and create index
on it ?
any ideas ?
Are you searching for headers? LIKE 'xyz%' or any piece in the middle
LIKE '%xyz%'?

In the first case you could define a generated VARCHAR column based on
an appropriate SUBSTR of the CLOB and search that.
To search for any piece in the middle you'd have to write a user defined
functions and indexes are out.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 27 '08 #2
On Jun 25, 7:31*am, Serge Rielau <srie...@ca.ibm.comwrote:
db2admin wrote:
Hello all,
I have table with CLOB column length of ~65K. application is searching
from this table *by CLOB and i can not create index on it.
I know IBM recommends using DB2 Net Search Extender or DB2 UDB Text
Information Extender for searching CLOBS but what are the other
solutions out there. can i use some other data type and create index
on it ?
any ideas ?

Are you searching for headers? LIKE 'xyz%' or any piece in the middle
LIKE '%xyz%'?

In the first case you could define a generated VARCHAR column based on
an appropriate SUBSTR of the CLOB and search that.
To search for any piece in the middle you'd have to write a user defined
functions and indexes are out.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
thankyou serge,

the keyword search is looking for anything LIKE '%xyz%'.
can you please explain what would be the nature of user defined
function ?

regards,
db2admin

Jun 27 '08 #3
db2admin wrote:
On Jun 25, 7:31 am, Serge Rielau <srie...@ca.ibm.comwrote:
>db2admin wrote:
>>Hello all,
I have table with CLOB column length of ~65K. application is searching
from this table by CLOB and i can not create index on it.
I know IBM recommends using DB2 Net Search Extender or DB2 UDB Text
Information Extender for searching CLOBS but what are the other
solutions out there. can i use some other data type and create index
on it ?
any ideas ?
Are you searching for headers? LIKE 'xyz%' or any piece in the middle
LIKE '%xyz%'?

In the first case you could define a generated VARCHAR column based on
an appropriate SUBSTR of the CLOB and search that.
To search for any piece in the middle you'd have to write a user defined
functions and indexes are out.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

thankyou serge,

the keyword search is looking for anything LIKE '%xyz%'.
can you please explain what would be the nature of user defined
function ?
Essentially the UDF would take the CLOB and the pattern as input and
you'd have to implement your own search.
There ought to be some open source code flying around that you could use
or perhaps Java provides some classes.
You could also look at ICU:
www.ibm.com/software/globalization/icu/index.jsp
There is a regular expression library.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 27 '08 #4

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

Similar topics

0
by: freak | last post by:
hi i have problems reading an oracle(9i) clob from a php-script with the MDB-class from pear. the table files has 3 fields: id integer document clob picture clob
1
by: Chris | last post by:
I use websphere connection pooling and had a failure attempting a CLOB.createTemporary. tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION); Here's an excerpt of the exception...
5
by: gimme_this_gimme_that | last post by:
In Oracle you can have a statement such as insert into foo (foo_id,some_clob) values (100,empty_clob()) where empty_clob() inserts a clob address. What is the approach in DB2 (8.1) to...
3
by: gupta.harika | last post by:
Hi everyone, I am a developer working on php with oracle as backend. I am facing a problem related with the CLOB data. The problem is as follows My application uses a table which contains Clob...
8
by: gimme_this_gimme_that | last post by:
I have the following Java code : package com.rhi.bb.udf.utils; import java.sql.Clob; import java.sql.SQLException; import java.util.regex.Pattern; import java.util.regex.Matcher;
5
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends,...
0
by: *Davide* | last post by:
Hello, This query (PHP+Oracle) works: global $user,$pass,$sid; $db_charset = 'UTF8'; $db = OCILogon($user, $pass, $sid, $db_charset); $clob = OCINewDescriptor($db, OCI_D_LOB); $txt_clob =...
0
by: srinivasaraonagisetty | last post by:
hi, I am faceing one problem, while inserting the data in db2 using clob. actually i am writing this type code: public class DBParam { private InputStream inputstream; private static int...
1
by: Veeru71 | last post by:
When I am SELECT'ing a CLOB column from command prompt, the output is getting truncated after a certail limit (8 K ??) How do I get the full data out of a CLOB column? Are there any string...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.