Click here to Skip to main content
15,909,530 members
Home / Discussions / Database
   

Database

 
QuestionHow to spread traffic on a table Pin
Johan Hakkesteegt21-Mar-11 23:24
Johan Hakkesteegt21-Mar-11 23:24 
AnswerRe: How to spread traffic on a table Pin
Corporal Agarn22-Mar-11 1:06
professionalCorporal Agarn22-Mar-11 1:06 
GeneralRe: How to spread traffic on a table Pin
Johan Hakkesteegt22-Mar-11 1:23
Johan Hakkesteegt22-Mar-11 1:23 
GeneralRe: How to spread traffic on a table Pin
Corporal Agarn22-Mar-11 1:27
professionalCorporal Agarn22-Mar-11 1:27 
GeneralRe: How to spread traffic on a table Pin
Johan Hakkesteegt22-Mar-11 2:11
Johan Hakkesteegt22-Mar-11 2:11 
AnswerRe: How to spread traffic on a table Pin
Mycroft Holmes22-Mar-11 1:32
professionalMycroft Holmes22-Mar-11 1:32 
GeneralRe: How to spread traffic on a table Pin
Johan Hakkesteegt22-Mar-11 1:55
Johan Hakkesteegt22-Mar-11 1:55 
AnswerRe: How to spread traffic on a table [modified] Pin
Jörgen Andersson22-Mar-11 1:54
professionalJörgen Andersson22-Mar-11 1:54 
If you are joining together a lot of tables and then make an aggregation on that join in one big query, you'll take a serious performance hit.
Have a look if it's possible to do the aggregation separately and then make the joins.
As similar to this:
WITH SalAgg as (
    SELECT  SUM(sal) sal
           ,DeptID
    From    Emp
    )
Select  deptid
       ,sal
       ,More info
       ,even more info
from    SalAgg s
join    Dept d
    On  s.deptid = d.deptid
If you dont like CTE[^]s you can of course use inline views instead.
Do also take a look at Indexed views[^].
List of common misconceptions
modified on Tuesday, March 22, 2011 8:50 AM

GeneralRe: How to spread traffic on a table Pin
Johan Hakkesteegt22-Mar-11 2:07
Johan Hakkesteegt22-Mar-11 2:07 
GeneralRe: How to spread traffic on a table Pin
Jörgen Andersson22-Mar-11 6:15
professionalJörgen Andersson22-Mar-11 6:15 
AnswerRe: How to spread traffic on a table Pin
Wendelius22-Mar-11 1:55
mentorWendelius22-Mar-11 1:55 
GeneralRe: How to spread traffic on a table Pin
Johan Hakkesteegt22-Mar-11 2:01
Johan Hakkesteegt22-Mar-11 2:01 
GeneralRe: How to spread traffic on a table Pin
Wendelius22-Mar-11 2:10
mentorWendelius22-Mar-11 2:10 
GeneralRe: How to spread traffic on a table Pin
Johan Hakkesteegt22-Mar-11 3:33
Johan Hakkesteegt22-Mar-11 3:33 
GeneralRe: How to spread traffic on a table Pin
Wendelius22-Mar-11 5:07
mentorWendelius22-Mar-11 5:07 
GeneralRe: How to spread traffic on a table Pin
Johan Hakkesteegt22-Mar-11 21:22
Johan Hakkesteegt22-Mar-11 21:22 
GeneralRe: How to spread traffic on a table Pin
Wendelius22-Mar-11 21:47
mentorWendelius22-Mar-11 21:47 
GeneralRe: How to spread traffic on a table Pin
Corporal Agarn22-Mar-11 5:08
professionalCorporal Agarn22-Mar-11 5:08 
GeneralRe: How to spread traffic on a table Pin
David Mujica22-Mar-11 3:24
David Mujica22-Mar-11 3:24 
GeneralRe: How to spread traffic on a table Pin
Johan Hakkesteegt22-Mar-11 3:40
Johan Hakkesteegt22-Mar-11 3:40 
AnswerRe: How to spread traffic on a table Pin
darkelv22-Mar-11 22:18
darkelv22-Mar-11 22:18 
QuestionSum of all rows Pin
CodingLover21-Mar-11 19:22
CodingLover21-Mar-11 19:22 
AnswerRe: Sum of all rows Pin
Wendelius21-Mar-11 19:50
mentorWendelius21-Mar-11 19:50 
GeneralRe: Sum of all rows Pin
CodingLover21-Mar-11 22:59
CodingLover21-Mar-11 22:59 
GeneralRe: Sum of all rows Pin
Wendelius22-Mar-11 2:12
mentorWendelius22-Mar-11 2:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.