MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using LIKE in VARCHAR datatype search - performance

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
jeeva_k
Beginner


Joined: 13 Apr 2006
Posts: 1
Topics: 1

PostPosted: Thu Apr 13, 2006 12:36 am    Post subject: Using LIKE in VARCHAR datatype search - performance Reply with quote

I am working on a CICS - DB2 program which is used for Online search purpose.

In the program, I am using LIKE predicate in WHERE CLAUSE. This is working well for single byte data (eg: english), whose datatype is CHAR.
Using this, i am getting the search results on the online screen really fast

Japanese double byte is defined as VARCHAR in database. When i try LIKE predicate on this VARCHAR variable, i do get the result, but the performance is really slow.

Is there any way to improve the performance of this.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Thu Apr 13, 2006 7:10 am    Post subject: Reply with quote

jeeva_k,

Try using lookup in hex format

ex: if you are looking for 'abc%'

then use

where var_col like X'C1C2C3%'

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group