Our environment uses classes created by netTiers to access MS SQL tables, which are accessed in VB.net applications.
I have successfully sped up several queries by adding "GetBy" methods on selected db columns.
However, I have created indexes for the data access that do not use a key. For example, I am querying a history file by date descending and it is rather slow. About 12 seconds response time. I created an index on that column descending and it gave me no performance increase at all.
I am rather new to the whole netTiers, data class methodology and am not sure where to look next to resolve this issue.
Here is an example of how I am accessing the data. The first time it gets hist there is a long delay. I believe it is building an index but it should not be as there is already an index.
For Each hist In HistoryProviderService.GetAll().OrderByDescending(Function(x) x.ModifiedDateTime).ToList()
' do stuff with hist
Next
Here is the code for the index
SET ANSI_PADDING ON
GO
CREATE NONCLUSTERED INDEX [IX_History_ModifiedDateTime] ON [Common].[History]
( [ModifiedDateTime] DESC,
[ModificationType] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
Any insight you can provide is greatly appreciated.