Quantcast
Channel: Obtimize this query
Browsing all 7 articles
Browse latest View live

Obtimize this query

TrySELECT [C].[ID] AS [ContentID], [C].[Name], [C].[URL] AS [URL] FROM [dbo].[Content] AS C WHERE C.ID = COALESCE(@Var1, @Var2)This is assuming that you're passing two parameters but use the same field...

View Article



Obtimize this query

UNION ALL might perform badly to compare with its original queryBest Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

View Article

Obtimize this query

First createcreate index for id column with include ContentID,Name,URLNext:SELECT [C].[ID] AS [ContentID], [C].[Name], [C].[URL] AS [URL] FROM [dbo].[Content] AS C where  [C].[ID] =...

View Article

Obtimize this query

It should perform well if you have proper defined indexesBest Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

View Article

Obtimize this query

Not sure if you have index for your content table or not and what is the index definition. if you don't have index, then try:Create nonclustered index idx_Content_id on dbo.content (id) include (name,...

View Article


Obtimize this query

We don't know about your tables (example which table contains huge values)Please refer the URL and optimize your...

View Article

Obtimize this query

Hi,Please help in optimizing this query.SELECT [C].[ID] AS [ContentID], [C].[Name], [C].[URL] AS [URL] FROM [dbo].[Content] AS C WHERE ((@VAR1 IS NOT NULL) AND ([C].[ID] = (@VAR1))) OR ((@VAR2 IS NOT...

View Article
Browsing all 7 articles
Browse latest View live




Latest Images