views:

74

answers:

2

I have 100,000 queries, and I need to create a google-like 'Suggestions' system. Much like this

alt text

I need it to be pretty quick, and if possible allow for some more in-depth options (like sorting, etc.).

Can anyone recommend a database system I could use for this that could handle searching through 100k+ queries while still keeping speed, or an existing project that you think would work for my needs?

I've been looking into possibly using MongoDB, but I'm not yet sure if that's the best route.

Any help is appreciated!

+1  A: 

There are many database solutions that will easily handle this requirement, 100K rows isn't really very many for a database. Based on what you've said in your question there isn't really a 'best' solution.

It just depends on what you have access to, and perhaps how you see the application growing. If it's going to grow into something more complex then you might be better off using a full relational database solution such as MySQL or MSSQL, otherwise MongoDB will be fine.

James Gaunt
+1  A: 

If they're really just 100K words, I'd be tempted to load the whole thing into memory, as a prefix trie. That will be blazingly fast.

Of course, that makes it slightly harder to update... what's adding to the list of options? Do you need an option added via one machine to be instantly available, or is eventual consistency good enough?

Jon Skeet