question

alexgil avatar image
alexgil asked

Any view in sql server filtered by date is very slow

In management studio 2008 R2 on Windows XP suddenly every view that I create and filter by Date is running very slow. For example on table of 10 rows, I filter by date and it takes 20 seconds to get the result. When I run the query on sqlquery window it is running fast. Same database on other computer working fast. Is it a problem with OS ? I reinstalled the sql server - no help. The query stuck during parsing stage - for example when I write >1/1/2017 on filter column of the view and it takes 30 seconds until I see result in sql pane.
sql-server-2008-r2windows
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
alexgil avatar image
alexgil answered
At last I found a problem and the solution: Short date format in regional options in computer was set to format: dd/MM/yy. When I changed to dd/MM/yyyy - Date filtering started working fast. I guess, I changed it previously without seeing the impact.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.