I have a table that contains approximately 22000 rows and I used a Boolean Full-Text Search in order to find what I`m interested in. My problem is that I created a 'dynamic search feeling' that consists of a DataGridView that it is refreshed after every TextChanged event. As you might have figured out it takes a lot of time to search for the inserted string after every event.

What could I do in order to improve the search speed?

Any suggestions are welcomed!

I'm not quit clear what you mean with boolean full-text search and what you're doing? Do you have an column that containing "True" or "False"?
The most dynamic feeling can be created by loading the records into memory. I cannot see what limitations you are confronted with.

I'm not quit clear what you mean with boolean full-text search and what you're doing? Do you have an column that containing "True" or "False"?
The most dynamic feeling can be created by loading the records into memory. I cannot see what limitations you are confronted with.

By Boolean Full-Text Search I mean this. Also, by 'dynamic search feeling' I meant real time search. My problem is that after each TextChanged event I`m trying to load the search results into a DataGridView and that takes a lot of time for that to be done. For example if one inserts character 'a' into the search textbox it will iterate through all the database and load into a datatable and then into the DataGridView all the lines that contain the character 'a'. Afterwards, if someone inserts another character and you get the string "as", for example, it will search into the database for all the lines from the database that contain the string "as" and then load those lines into the DataGridView. Due to these repeated iterations through all the database it takes a lot of time to load the search results into the DataGridView, and I`m searching for something that could speed up the search.

So far I have tried splitting the search into 11 separate threads, each one of the first 10 searching through 2000 lines at a time and the last one searching through what is left but that does not help that much either. I also found some search engines like Lucene or Sphinx but unfortunately I did not manage to find explicit documentation for any of them. As I said, any help is welcomed, either with the actual method of searching or with one of those search engines like the ones aforementioned.

Edited 5 Years Ago by catcit: n/a

What you can do is only load your dataset when the first character is entered. (and cleared when the search string is empty). When the second and next characters are entered your filter your defaultView of the tables bindingsource:

TableBindingSource.Filter = string.Format("columnname LIKE '{0}%'", filtertext);

Edited 5 Years Ago by C#Jaap: n/a

This article has been dead for over six months. Start a new discussion instead.