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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Performance of the query

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2007-03-29 : 15:16:15
guys,

I have the following scenario

query 1

select e.batch. p.personname
from employee e inner join person p
on e.empid = p.pid

create view employee
as
select empid, batch
from vemployee

query 2

select e.batch. p.personname
from vemployee e inner join person p
on e.empid = p.pid

My developers are using query 2 which uses vemployee view - it is flat select from employee table. I am having
them 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
Go to Top of Page

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 thousands

You only learn by practice
Go to Top of Page
   

- Advertisement -