The Artima Developer Community
Sponsored Link

Design Forum
Design for performance

1 reply on 1 page. Most recent reply: Nov 17, 2010 4:14 AM by simple sol

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
simple sol

Posts: 3
Nickname: denjai
Registered: Nov, 2010

Design for performance Posted: Nov 17, 2010 4:04 AM
Reply to this message Reply
Advertisement
I am using Springs+Hibernate in my application. I have a auto suggest which can search on field where the starting letters match

If values in database are

1 Green curry
2 curry chilly
3 Red Green Chilly Curry

If I type

curr it should give me all the above values as suggestion
If I type Gree it should give me 1 and 3.
If I type urry (missing c) it should not give any results

In short I want to search starts with on any word.
The data is stored in single field in database and can have huge number of records.

What design should we go with to satisfy the requirement considering we do not want to change the data base scheme to split the storage based on space.

1. Keeping some in memory data structure?
2. Using index search like lucene? Might be too much work to introuce indexing for this simple requirement?
3. Any other way to perform such queries in hibernate?
4. Any other ideas?

So the search tokens should be generated


simple sol

Posts: 3
Nickname: denjai
Registered: Nov, 2010

Re: Design for performance Posted: Nov 17, 2010 4:14 AM
Reply to this message Reply
Just some more details

The number of rows might be in the range of 30k to 40k so not that huge but just want to tune for auto suggest usability

Flat View: This topic has 1 reply on 1 page
Topic: Document for SRS Previous Topic   Next Topic Topic: Database transactions and exceptions don't mix! (need design help)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use