Click to See Complete Forum and Search --> : Please help noob. Performance issue.


burnt1ce85
10-12-2006, 11:08 AM
i'm not sure if im asking in the right forum but if you know what SQL then you must know something about databases.

Suppose i want to make a mockup of Google suggest. but instead i do a search of the internet, i just want to do a search on a particular name, ex: "John Smith". And as the user is typing the "John Smith", the website will try to fill the rest out by showing "Johnathon Springer", "Jonny Jones", and "John Smith". Of course it depends on what the user has inputed which would determine the list of names that would be shown.


There are two approaches that this can be done. Which one would have better performance?

1) for each possible sequence of letters that a user can input, there would be an xml file that could 3 names that the user could be interested in. (look above for example). The javascript client would download this xml file, and parse the names and display it. This would ofcourse require a huge number of xml files but this would require no special backend service. You can get any free hosting account to implement this feature.

2) Another option is using c# for the server side client connecting to a Oracle/SQL server that contains all the names. The client would send the user's query and spits out a few names, similar to 1).

Which option would be better to use? I'm expecting to search for over 10,000 names. Which option would be faster for the client? Which option would be faster for server?

dotancohen
10-12-2006, 09:28 PM
Don't trust that the user's machine will do this. Google suggest is AJAX, and I myself don't understand how it is so fast. You've got quite a bit of engineering to do if you want to match that speed.

russell
10-12-2006, 10:57 PM
use a database. too much data for decent performance any other way