indexing - SQL Server non-clustered Index never shows up in execution plan -


i have database table called tbl_event non-clustered indexes idx_event_folder , idx_event_time defined as:

create nonclustered index [idx_event_folder]  on [dbo].[tbl_event]([nobjectid] asc)  create nonclustered index [idx_event_time]  on [dbo].[tbl_event]([tetime] asc) 

i ran following simple queries , got execution plans displayed directly underneath:

query 1:

select *  tbl_event  tbl_event.nobjectid = 1410000 order tetime 

execution plan query 1

query 2:

select *  tbl_event  tbl_event.nobjectid = 1410000 

execution plan query 2

my question is, why index on nobjectid never utilized? expect there index seek or scan when nobjectid specified in clause of these select statements. understanding of analysis incorrect?

you in comments there 18325170 rows in table, 30 of them have nobjectid=1410000.

even if idx_event_folder index disabled cannot believe sql server choose plan amount of rows , line thickness indicates thinks dealing maybe 1 row not 18325170!

plan

so i'm pretty sure must have auto update statistics disabled? if need update statistics manually (or preferably enable option)


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -