Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which is Faster
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Miscellaneous
Thread ID:
01219224
Message ID:
01219293
Views:
12
>My companytable got over 35 fields (include 4 address field nvarchar(50)X 4, contact person.. etc)
>Now I need to insert to company code and company name into a temp table.
>
>(1) insert into myTemp(...) select .... from companytable
>OR
>(2) I create a view first which only select 10 fields from companytable
>insert into myTemp(....) select .. from myView
>
>Which is faster ?
>Thanks

Internally on the server my guess is that (1) might be slightly faster as SQL Server doesn't seem to optimize views well. The speed difference is probably very small unless you have a lot of records or you are putting some nonoptimized conditions in the query.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform