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

  • SEARCH
  • Home
  • 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 6163305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:48:15+00:00 2026-05-23T21:48:15+00:00

My application is in C# [.NET 3.5] and MySQL 5.1 back-end. I have a

  • 0

My application is in C# [.NET 3.5] and MySQL 5.1 back-end.

I have a Windows Form with a TextBox and a DataGridView. When the user types in few characters in the TextBox, an SQL Query with a Like clause is run to filter the records shown in the DataGridView below.

The items list has grown considerably and also I don’t find running an SQL query on each character input appropriate. An alternative way I think is to create a DataSet when the application loads and fill it with the recent stock position upfront. Than use LINQ or something like that to filter the in-memory record-set. But this method is also not optimized because whenever a new bill is created, items from the stock are reduced and each time I will need to update the in-memory record-set.

Is there any other optimized and faster way?

  • 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-23T21:48:15+00:00Added an answer on May 23, 2026 at 9:48 pm

    There are a few optimizations that can be done

    Database layer
    Great post on how to optimize everything on db side

    You can also try sharding and horizontal scaling

    Application side
    Do not use dataset, as they are heavy, bulky, slow and make it hard to maintain the same copy of data as on the db. Think over a few tricks:

    • Cache user search
    • Start searching only after 2 or 3 symbols typed
    • Run search in background thread
    • Limit search to TOP 20 (or whatever)
    • Make sure search is light from various code abstractions, make it simple
    • Optimize you search query, order of SQL operations does matter

    Infrastructure

    • Check your connection speed, any possibility to improve it?
    • Put your db as close to the application as possible
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Windows form application(.Net 3.5) I have a textbox and a button on the form.
I developed a C#.NET desktop application that uses MySQL as a back-end. What I
I have a C#.Net windows application. Where MYSQL is installed on server say 11.90.109.19
I am using MySQL 5.0 as back end with VB.NET as front end(Windows Applicaions).
I create asp.net mvc application using mysql as the database in the back end.
I am quite new to C# .net windows form application. I am building a
I'm working on a vb.net application connecting to mysql db which will have alot
HI All, We have a .Net 2.0 application which has a MySQL backend. We
We have a VB.Net application which works fine in our tests in different Windows
I'm loading data from a MySQL database into a C# .NET application. The data

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.