Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1106915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:51:43+00:00 2026-05-17T01:51:43+00:00

I’ve started working on a basic instant search tool. This is a workflow draft.

  • 0

I’ve started working on a basic instant search tool.

This is a workflow draft.

  1. User presses a key
  2. Current value gets passed to the function which will make an Ajax call to a web service
  3. Web service will run a select on a database through LINQ-To-SQL and will retrieve a list of values that match my value. I will achieve this by using SQL Like clause
  4. Web service will return data to the function.
  5. Function will populate relative controls through jQuery.

I have the following concerns/considerations:

Problem: Fast typists: I have typed in this sentence within few seconds. This means that on each key press I will send a request to a database. I may have 10 people doing the same thing. Server may return a list of 5 records, or it may return a list of 1000 records. Also I can hold down a key and this will send few hundred requests to a database – this can potentially slow the whole system down.

Possible solutions:

  1. Timer where I will be able to send a request to database once every 2-4 seconds
  2. Do not return any data unless the value is at least 3 characters long
  3. Return a limited number of rows?

Problem: I’m not sure whether LINQ-to-SQL will cope with the potential load.

Solution: I can use stored procedures, but is there any other feasible alternatives?

I’m interested to hear if anybody else is working on a similar project and what things you have considered before implementing it.

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:51:44+00:00Added an answer on May 17, 2026 at 1:51 am

    When to call the web service

    You should only call the web service when the user is interested in suggestions. The user will only type fast if he knows what to type. So while he’s typing fast, you don’t have to provide suggestions to the user.

    When a fast typist pauses for a short time, then he’s probably interested in search suggestions. That’s when you call the web service to retrieve suggestions.

    Slow typists will always benefit from search suggestions, because it can save them time typing in the query. In this case you will always have short pauses between the keystrokes. Again, these short pauses are your queue to retrieve suggestions from the web service.

    You can use the setTimeout function to call your web service 500 milliseconds after the user has pressed a key. If the user presses a key, you can reset the timeout using clearTimeout. This will result in a call to the web service only when the user is idle for half a second.

    Performance of LINQ-to-SQL

    If your query isn’t too complex, LINQ-to-SQL will probably perform just fine.

    To improve performance, you can limit the number of suggestions to about twenty. Most users aren’t interested in thousands of suggestions anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.