Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 124925

For questions about improving the performance and/or efficiency of database queries.

0 votes

Replacing isnull condition in where clause

I made following changes for the query, which gave better performance.Thanks Joe and Kumar for your suggestions. SELECT h.deal_date h_date,i.deal_date i_date,h.source_deal_header_id source_deal_heade …
Madhusudan's user avatar
1 vote
1 answer
284 views

Using table valued function as a table in sql server join

I have a scenario where SQL server using table valued function with joins to many other tables. The function returns many columns, which are not always desirable output for every report, causing lots …
Madhusudan's user avatar
0 votes
2 answers
123 views

formating date colums causing performance issues

I have a query(written by my previous co-worker) with date columns returned as output but formatted, which s causing performance degradation (for below query returning 10k records, performance degrade …
Madhusudan's user avatar
2 votes
3 answers
5k views

Replacing isnull condition in where clause

I have a where clause as follows: where table1.col1=isnull(table2.col1,table1.col1) This condition does not utilize the index in table2.col1 and performance is slow. So I replaced it with following …
Madhusudan's user avatar
0 votes

Query turned into a CPU gobbling monster

I would recommend to break the query as follows: --select MAX(SnapshotDate) only once DECLARE @MAX_SnapshotDate datetime --use the appropriate data type SELECT @MAX_SnapshotDate=MAX(SnapshotDate) FR …
Madhusudan's user avatar
-2 votes
1 answer
1k views

Optimize a query using same temporary table in outer apply

I have a query using outer apply on the same temporary table again(written by someone long back). It is performing very slow.Please suggest ways to improve. Thanks in advance. UPDATE fb …
Madhusudan's user avatar