I have this web app. The search page has 3 text fields that you can search by (Name, Addres, and Contact Name) and a Search button.
I have an SQLDataSource1 with the statement: SELECT [Name], [Address], [City], [State], [ContactName] FROM [Owner] WHERE (([Address] LIKE '%' + @Address + '%') AND ([Name] LIKE '%' + @Name + '%') AND ([ContactName] LIKE '%' + @ContactName + '%')). The three search fields have the wildcard (%) as the default in case nothing is entered.
I have a GridView that uses SQLDataSource1. I have set it to Visible = false.
In the code behind for the button, it sets the Visible property of the GridView to true.
I have 3 records in the database now and it looks and operates EXACTLY how I need it to be when I click the search button.
MY Question:
I've heard this would be very slow. I've heard that I should use full-text indexing, but it seems like overkill for this simple search. I am using SQL Server 2005. Can you guys estimate the seconds it would take to search through the following (completely returning all results, no TOP 10) number of records using LIKE in a varchar(60) address:
1,000 -
10,000 -
100,000 -
1,000,000 -
Start Free Trial