speed up views with conversions

  • Thread starter Thread starter Eva Mayr
  • Start date Start date
E

Eva Mayr

Hello,

i´m working in a adp, connected to the sqlserver. I created view2, which has
access to view1. In view2 are some conversions with "cast". Trying to open
view2, takes over a minute. Is there a possibility to speed this task?

view2:
SELECT ID1, Id, Datart, Jahre, Periode, cast(Schwund_L15 AS float)
AS Schwund_L15, cast(Schwund_LVT AS float)
AS Schwund_LVT,
cast(schwund_L15 - Schwund_LVT AS float)
AS Temp_Schwund, cast(Uhr_Diff AS float) AS Verkauf_Spanne,
cast(L15 AS float) AS L15, cast(LVT AS float) AS LVT
FROM dbo.vw_view1

Thank you in advance!

Eva
 
add WITH (NOLOCK) after your tables in the SQL Statement.

This is known as a 'Query Hint'.

it might make a HUGE difference if you're on a busy server!
 
Back
Top