• Post Reply Bookmark Topic Watch Topic
  • New Topic

Wild card Search

 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Can any body suggest best algorithm from performance point of view for wild card search. The search critiera is of type %foo% and target table in oracle has size order of 10,00,000 records.

Thanks
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does %foo% mean?

Do you want to search with Java or with Oracle (i.e. SQL)? It's not clear from your post.
 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peter Chase:
What does %foo% mean?.[/QB]
It means searching all names having foo as part of name.

Do you want to search with Java or with Oracle (i.e. SQL)? It's not clear from your post


I want to search from java .Target database is oracle .
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That type of search is probably best handled in the database. Either way you would have to search all the data for such flexible wildcard searches. I am assuming you can search the text for any other text embedded in it.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to do it in Java???

SQL has a LIKE condition that would do exactly what you need: http://www.techonthenet.com/sql/like.php
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!