[dba-SQLServer] Difference between views and queries

Francisco H Tapia my.lists at verizon.net
Fri Jun 11 11:42:33 CDT 2004


Stuart McLachlan wrote On 6/11/2004 6:20 AM:

>On 10 Jun 2004 at 12:07, Jim Lawrence (AccessD) wrote:
>
>  
>
>>Hi John:
>>
>>Personally, I see little reason to run views as their creation is spawned at
>>the server side and any hit on the server I try to avoid. The concept of
>>distributive computing has always appealed to me. Queries, run at the client
>>side.
>>
>>    
>>
>
>But surely not when it means pulling unnecessary data and indexes across the 
>network. The whole point of server side computation is to reduce the network 
>traffic bottleneck.  I'd much rather let the server sort throuygh a million 
>rows and feed the workstation with a thousand, rather than pass all million 
>across the network and filter then client side.
>  
>
Views are useful when a parameter is not needed.  Server Sided queries 
run faster than those on clients because as a general rule, the Server 
is a much more powerful box than that of the clients.  The purpose of 
keeping views and stored procedures on the server is to help provide 
"faster" access to those 10,100, 1000 or millions of rows.

>  
>
>>There might be better performance with views, if there are limited people
>>accessing the server. 
>>    
>>
>
>The more people hitting the server the better, you gain more from caching :-)
>
>Views limit, not that the client can see it anyway,
>  
>
Right, If your server is underpowered, well maybe it's time to get a 
better server :)

>>access to/display of the real table and present a pseudo table. Security?
>>
>>    
>>
>
>That enhances security, not dimishes it.
> 
>  
>
Yes it is security because you are capable of segmenting data that the 
end user "should" not be viewing.. and you also enhance data (that is 
provide it faster) and join and provide values that the end user is used 
to using, not ID's (be it autonumber, GUID or COMBs).

-- 
-Francisco





More information about the dba-SQLServer mailing list