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 |
notmyrealname
98 Posts |
Posted - 2014-06-04 : 13:00:54
|
Hi,I have a view that executes fine. It returns about a million records and executes in a couple seconds. The problem I am having is that if I query the view with a filter it executes very slowly. About a row per second - so it would take forever to complete.This works fine...SELECT *FROM vw_AssemblyInquiry But this does not...SELECT *FROM vw_AssemblyInquiryWHERE (Project = N'12-282') In addition, if I add the filter directly to the view query then it will work fine. I just won't work if I append a filter to a SELECT against the view.I hope this is clear enough. Does any understand what is happening?Thanks. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-06-04 : 13:01:48
|
Do you have an index on Project? Is it an indexed view?Show us the execution plan of both queries.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
notmyrealname
98 Posts |
Posted - 2014-06-09 : 10:34:42
|
Sorry for the delay. This issue seemed to have resolved itself. For a couple days it would not work but now everything is working again. I do not manage the server so I don't know if there was something occurring in the background that would have caused this issue. Thanks for your help. I have double checked to ensure all of my indexes are in place. |
|
|
|
|
|