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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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 user 20682

Use this tag for questions about improving the performance and/or efficiency of database queries.

3
votes
Because you desire a categorization hierarchy of indeterminate depth, you will have to use a single category table structured along these lines: CREATE TABLE Category ( Category_ID INT …
answered Jul 20 '14 by Pieter Geerkens
2
votes
You have forgotten the join criteria and ist.id = i_team_2.status_id. If you had used the modern JOIN syntax this would have stood out like a sore thumb.
answered Sep 17 '14 by Pieter Geerkens
0
votes
Just for fun, why not try this SQL instead, which rearranges things a bit: create table #t(name sysname) insert #t(Name) select Name from sys.databases where state_desc = 'ONLINE' except select …
answered Jul 26 '14 by Pieter Geerkens
1
vote
At 14 million rows in your largest table and 16GB of RAM devoted to SQL Server it sounds like your entire DB almost fits in memory. If that is true the problem is likely to be quadratic (or worse) beh …
answered Jul 24 '14 by Pieter Geerkens
1
vote
Put the list of values into a temporary table, and then perform an INNER JOIN to it. Most SQL optimizers and engines can handle joins much better than they can handle an IN operation. If the list is l …
answered Oct 29 '14 by Pieter Geerkens