locked
View is running slow RRS feed

  • Question

  • Hi expert,

      I have a view that  give me the data of all the batched. Now I am using a query on view to get a single batched data. when I am using direct query it was taking 0 sec but when I am using Through view "select *  from myView where batched=2" then its taking 30 mnt

     


    Regards Vikas Pathak

    Wednesday, November 25, 2015 8:25 AM

Answers

  • Try to put your T-SQL query in a stored proc with using 

    SET ANSI_NULLS ON at the top of stored proc.

    Wednesday, November 25, 2015 1:43 PM

All replies

  • Does the view joins with any other table, does it have aggregation 

    Thanks Saravana Kumar C

    Wednesday, November 25, 2015 9:07 AM
  • Yes this view has joins

    Regards Vikas Pathak

    Wednesday, November 25, 2015 10:29 AM
  • Try to put your T-SQL query in a stored proc with using 

    SET ANSI_NULLS ON at the top of stored proc.

    Wednesday, November 25, 2015 1:43 PM