Group:  Microsoft Access » microsoft.public.access.adp.sqlserver
Thread: speed up views with conversions

Geek News

speed up views with conversions
"Eva Mayr" <eva.mayr[ at ]web.de> 11/27/2008 10:05:47 AM
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


Re: speed up views with conversions
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)> 11/27/2008 4:49:21 PM
How long it takes to open View1? How about adding a Where statement?

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"Eva Mayr" <eva.mayr[ at ]web.de> wrote in message
news:e7FN5eHUJHA.5860[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> 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
>


Re: speed up views with conversions
a a r o n _ k e m p f <aaron_kempf[ at ]hotmail.com> 12/22/2008 6:46:06 AM
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!




On Nov 27, 2:05 am, "Eva Mayr" <eva.m...[ at ]web.de> wrote:
[Quoted Text]
> 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

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net