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 2008 Forums
 Transact-SQL (2008)
 Peroformance issue with view

Author  Topic 

sateesh.sqldba
Starting Member

25 Posts

Posted - 2011-04-27 : 03:48:02
Hi Guys,

I created view based on multiple tables(Using join of 3 tables)

Like this
Select * from Data_L1 a
left outer join L1_Notes b on b.Contract#=a.Contract#
left outer join [L1_Region] c on a.Territory_Name=c.Region_existing

Final result is having 23000 only but it taking 20 seconds to retrieve data

Thanks inAdvance!
Sateesh
can anyone help me out to improve performance

sateesh

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-04-27 : 03:56:34
We need create table statements including indexes etc. and the exact create view statement.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Jahanzaib
Posting Yak Master

115 Posts

Posted - 2011-04-27 : 10:50:03
Provide execution plan

Paste your query on the Query analyzer and then click on the DISPLAY EXECUTION PLAN button

1-Index on table L1_REGION on column REGION_EXISTING
If this table is READONLY then FilFactor should be 100 otherwise 75

2-Index on table L1_NOTES on column CONTRACT
If this table is READONLY then FilFactor should be 100 otherwise 75

3-Index on table DATA_L1 on column REGION_EXISTING
4-Index on table DATA_L1 on column CONTRACT
If this table is READONLY then FilFactor should be 100 otherwise 75,include all column name exclude contract,this index will be a covering index

5-Include columns name againts (*) and dont include these three columns if possible

6-How much records in these different tables
7-Update the statistics of these 3 tables


Regards,

Syed Jahanzaib Bin Hassan
MCTS,MCITP,OCA,OCP,OCE,SCJP,IBMCDBA

My Blog
www.aureus-salah.com
Go to Top of Page
   

- Advertisement -