Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
scelamko
Constraint Violating Yak Guru
309 Posts |
Posted - 2007-03-29 : 15:16:15
|
guys,I have the following scenario query 1select e.batch. p.personnamefrom employee e inner join person pon e.empid = p.pidcreate view employeeas select empid, batchfrom vemployeequery 2select e.batch. p.personnamefrom vemployee e inner join person pon e.empid = p.pidMy developers are using query 2 which uses vemployee view - it is flat select from employee table. I am havingthem change to query since I dont see a point. Question - isnt query 1 better interms of performance ??Thanks |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-03-29 : 15:38:51
|
if vemployee just returns all rows in employee, then i don't see any difference perf-wise.do the query plans look any different? www.elsasoft.org |
 |
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2007-03-29 : 15:42:57
|
Is there any indexes on the employees table or does it just do a table scan when the query is run, also how big is the table ten of employees or thousandsYou only learn by practice |
 |
|
|
|
|