My SQLite database has over 500,000 rows. Being new I have just started using additional indexes in my VB.net application with some startling speed improvements :).
These improvements are not replicated when I index the Date column of my table. I am going to include some code snippets details below and would appreciate any input regarding what I may be doing wrong.
'When creating the date column in DB (amongst others)
oMainQueryR.CommandText += "RDate DATE, "
'creating index
oMainQueryR.CommandText = "Create INDEX main.iRDate ON DatabaseRows(RDate)"
oMainQueryR.ExecuteNonQuery()
'Storing the Data
.Parameters.Add(":Rdate", DbType.Date)
cmdSQLite.Parameters(":Rdate").Value = CDate(TextSplit(1)).ToString("dd/MM/yyyy")
'SQL Call to retrieve data
oMainQueryR.CommandText = "SELECT * FROM DatabaseRows " _
& "WHERE DATE([RDate]) BETWEEN DATE(:StartDate) AND DATE(:EndDate) " _
The Calls and everything is working OK and I get the correct functionality its just there is no improvement when I index the RDate column speed wise.
I should mention that the index appears to be created correctly
Would appreciate any help, thank you