Sample Header Ad - 728x90

SQL Database query working really slowly

0 votes
0 answers
50 views
I have a database with two columns: 1)Word 2) Times Used When the user enters a word it find the combination of words already typed (ex: combo = hello world) and updates the database using a dataset The query is as follows: SELECT TimesUsed, Word FROM Predictions WHERE (Word LIKE @partialWord) ORDER BY TimesUsed DESC In my application I am calling it as follows: PredTable = PredTA.GetDataByPartialWord(combo) If PredTable.Count > 1 Then MsgBox("problem") If PredTable.Count = 1 Then PredTA.Update(PredTable(0).TimesUsed + 1, combo) If PredTable.Count = 0 Then PredTA.Insert(combo, 1) When I debug it is taking 0.15 seconds to just do this query Is there anyway that I can quicken this up?
Asked by Dman (133 rep)
Dec 1, 2014, 03:56 PM