Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ComputerMike
Starting Member
18 Posts |
Posted - 2010-03-31 : 18:39:56
|
We have views based on Tables with Indexes(for security). The views have no indexes. Will a select on the view use the index? Also, could anyone comment on the use of SQL functions in the where clause of a procedure that selects from the the view (that doesn't have an index , but is based on table that does). Hope I wasn't too confusing.  |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
ComputerMike
Starting Member
18 Posts |
Posted - 2010-03-31 : 18:48:34
|
| I use isnull function in where claues.....where isnull(mydate,'2050-12-31') |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2010-03-31 : 21:40:52
|
quote: Originally posted by ComputerMike I use isnull function in where claues.....where isnull(mydate,'2050-12-31')
And that will have performance implications. If you had an index on "mydate" column it would not be used. Throwing a function around a column makes the value indeterministic. So SQL Server will not use the index and will do a scan instead.Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
|
|
|