long time to run Update Stmt.
Hi All the Below Query updating nearly 3000 records in a table every day. but its taking too long time to update all records ( 1 Hr-1.30 Min). Any suggestions ? update A set A.ForAddInd = 'Y' from...
View ArticleAnalyze Query in DTA
Hi I analyzed a query in DTA. It recommended the following indexes: CREATE NONCLUSTERED INDEX iX_table1_Column1 ON dbo.table1 ( Column1 ) INCLUDE ( Column2) CREATE NONCLUSTERED INDEX iX_table1_Column1...
View ArticleWhat could cause query execution-plan change?
Hello, Recently, I noticed quite strange behaviour of execution plan for a query which processes data in batches ca. 10000 records. The query joins two very large tables (ca. 20 mln and 160mln) by...
View Articlequery performance tuning
Hi all, I have a query I wrote for an SSRS report. When I run the query in SSMS its slow like it takes 7 minutes to run but eventually gives me results. When I try to run the report, it does not ever...
View ArticleHow do I match values from a PIVOT?
I'd like to get a extract table result, with a reference id primary key, showing the maximum dates for events and who was responsible for them. I can get the max(date) field in columns using PIVOT, but...
View ArticleComplex LEFT OUTER JOIN or OUTER APPLY / NULL problem
Afternoon All, Help me check my thinking on this one. And please pardon then lack CREATE TABLES…I’ll post those when I get back to the office. I have a table of daily flight activity for airplanes...
View Articlequery timeout
I have a report builder,User can add any field that need and also can filter on any field/s. the base table has more than 20 million records and I show only 20-30 rows [using paging]. when I filter the...
View ArticleTuning SQL Query - Running too long
Hello! I have a query that does exactly what I need it to but I know there has to a better way to write this because it runs for 17 minutes. The problem is in the where logic because when I take the...
View ArticleIndexing tips
Hi All, I need your ideas and tips to performance tune a massively expensive query. How do I get around attaching the xml file over here please ? [Link to Execution plan (rename as .sqlplan)][1] [1]:...
View ArticlePlease tune the code
Dear All, Have wrote a script. Could you please tune the code. bit urgent. select J.RouteID TripID, J.JourneyAlias Journey_Trip_Id, J.OwningDepotDropPointID Depot, JD.DropPointID LocationID,...
View Articlelong time to run Update Stmt.
Hi All the Below Query updating nearly 3000 records in a table every day. but its taking too long time to update all records ( 1 Hr-1.30 Min). Any suggestions ? update A set A.ForAddInd = 'Y' from...
View ArticleAnalyze Query in DTA
Hi I analyzed a query in DTA. It recommended the following indexes: CREATE NONCLUSTERED INDEX iX_table1_Column1 ON dbo.table1 ( Column1 ) INCLUDE ( Column2) CREATE NONCLUSTERED INDEX iX_table1_Column1...
View ArticleWhat could cause query execution-plan change?
Hello, Recently, I noticed quite strange behaviour of execution plan for a query which processes data in batches ca. 10000 records. The query joins two very large tables (ca. 20 mln and 160mln) by...
View Articlequery performance tuning
Hi all, I have a query I wrote for an SSRS report. When I run the query in SSMS its slow like it takes 7 minutes to run but eventually gives me results. When I try to run the report, it does not ever...
View ArticleHow do I match values from a PIVOT?
I'd like to get a extract table result, with a reference id primary key, showing the maximum dates for events and who was responsible for them. I can get the max(date) field in columns using PIVOT, but...
View ArticleComplex LEFT OUTER JOIN or OUTER APPLY / NULL problem
Afternoon All, Help me check my thinking on this one. And please pardon then lack CREATE TABLES…I’ll post those when I get back to the office. I have a table of daily flight activity for airplanes...
View Articlequery timeout
I have a report builder,User can add any field that need and also can filter on any field/s. the base table has more than 20 million records and I show only 20-30 rows [using paging]. when I filter the...
View ArticleTuning SQL Query - Running too long
Hello! I have a query that does exactly what I need it to but I know there has to a better way to write this because it runs for 17 minutes. The problem is in the where logic because when I take the...
View ArticleIndexing tips
Hi All, I need your ideas and tips to performance tune a massively expensive query. How do I get around attaching the xml file over here please ? [Link to Execution plan (rename as .sqlplan)][1] [1]:...
View ArticlePlease tune the code
Dear All, Have wrote a script. Could you please tune the code. bit urgent. select J.RouteID TripID, J.JourneyAlias Journey_Trip_Id, J.OwningDepotDropPointID Depot, JD.DropPointID LocationID,...
View Article