Reputation
665
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
3 9
Newest
 Editor
Impact
~5k people reached

  • 0 posts edited
  • 0 helpful flags
  • 85 votes cast
Jul
29
comment Why is table variable forcing an index scan while temp table uses seek and bookmark lookup?
Great answer. A small tangential question: when would a loop join not be possible? I can easily think of an example where forcing a hash or merge join will result in "Query processor could not produce a query plan because of the hints defined in this query" (any join with no equality predicate), but it seems like a loop join could serve as the physical implementation for any logical join. (Obviously it might be a bad choice for performance in some cases though.)
Jul
29
revised Guidelines for full-text index maintenance
deleted 2 characters in body
Jul
29
revised Guidelines for full-text index maintenance
added 61 characters in body
Jul
29
accepted Guidelines for full-text index maintenance
Jul
29
answered Guidelines for full-text index maintenance
Jul
23
answered Category entity relationship / subtype relationships design
Jul
22
asked Guidelines for full-text index maintenance
Jul
15
comment Effective indexing and querying of overlapping date/time ranges
You might take a look at dba.stackexchange.com/questions/10113/… I think that your problem is similar, except you would always want accountId to precede any other index columns (assuming that you will always be querying a single accountId out of many accountIds overall)
Jul
14
answered Determine Gap Records, Fill and Return Result
Jul
14
comment Refactoring 80 GB table that stores massive amount of calculated results
It would be helpful if you can show a few of the key queries that are hitting this table and describe more about the usage pattern; how frequently are rows inserted? How many rows are inserted at once? How long do rows remain in the table before deletion? Do all operations take place within one distinct value of Column14? Is there a large reporting query that operates on a large swath of the rows in this table? What does it look like? Etc.
Jul
10
answered nvarchar(max) converting to varchar and table optimization
Jul
10
answered Doing a left join and having every match include an extra null row
Jul
8
answered Extrapolating gaps in hourly data
Jul
8
comment Two servers, different execution plans. Several orders of magnitude difference in run time
Posting the two execution plans would be very helpful.
Jul
2
revised Insert data between 30 minute time intervals
added 234 characters in body
Jul
2
answered Insert data between 30 minute time intervals
Jun
29
comment Make a column for each count(*) in a day of the week
Thanks for pointing that out. Just shows the danger of trying to use those "day of week" date functions, and it's good to get out of my English-centric thinking. My updated approach ends up looking a bit more similar to yours once I fixed that issue.
Jun
29
revised Make a column for each count(*) in a day of the week
added 1700 characters in body
Jun
29
answered Make a column for each count(*) in a day of the week
Jun
17
answered SQL Server : query code