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 2005 Forums
 Transact-SQL (2005)
 View

Author  Topic 

charul
Starting Member

18 Posts

Posted - 2008-06-03 : 05:46:43
i have a view that calls 4-5 functions and many joins,
the time to display data is around 10-11 mins,
how can i improve performance?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-03 : 05:51:29
Create proper indexes.
Write better code in functions.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-03 : 05:53:32
Run the query contianing view with display execution plan option and look into plan to spot any costly queries. Try optimizing them individually. Also try executing functions directly with execution plan and identify if they have some bottlenecks. You could also use SQL profiler for spotting long running queries.
Go to Top of Page

charul
Starting Member

18 Posts

Posted - 2008-07-09 : 02:42:30
quote:
Originally posted by visakh16

Run the query contianing view with display execution plan option and look into plan to spot any costly queries. Try optimizing them individually. Also try executing functions directly with execution plan and identify if they have some bottlenecks. You could also use SQL profiler for spotting long running queries.



Hi Visakh,

When i run the Execution Plan for a Stored procedure, One of the Queries Cost : 14%.
when i see the details , Hash Match shows 50% and Table Scan 44 %.
how should i interpret these as? also what modifications can be done
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-09 : 03:54:29
Try if you can avoid table scan by adding proper indexes to table. ALso are you doing some aggregations in your query?
Go to Top of Page
   

- Advertisement -