I have never really used alot of views before but when I created a view from a sql-query I've previously made I discovered that it rearranged my entire query, adding owner and tablename in front of all fields and everything. I tend to make stored procedures of my sql-queries, but should I maybe have the "view-creator" fix my query before I put it into the sp? Will this ease the load on the query-optimizer or something?It's a recommanded practice to reffer to your tables in the form owner.tablename because in this way your users can benefit of cached execution palns for that query. SQL Server first looks for a cached query of the owner (if specified one), or else try to find another cached exec plan for the user of the connection.
IONUT
Sunday, March 11, 2012
Creating sql by using "view-creator" in EM
Labels:
created,
creating,
database,
discovered,
microsoft,
mysql,
oracle,
rearranged,
server,
sql,
sql-query,
view,
view-creator,
views
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment