Click here to Skip to main content
15,905,875 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Table join performance - the saga continues... Pin
Mycroft Holmes8-Sep-16 14:57
professionalMycroft Holmes8-Sep-16 14:57 
GeneralRe: Table join performance - the saga continues... Pin
RossMW8-Sep-16 19:38
professionalRossMW8-Sep-16 19:38 
GeneralRe: Table join performance - the saga continues... Pin
Vark1119-Sep-16 2:18
Vark1119-Sep-16 2:18 
GeneralRe: Table join performance - the saga continues... Pin
Richard Deeming9-Sep-16 2:23
mveRichard Deeming9-Sep-16 2:23 
GeneralRe: Table join performance - the saga continues... Pin
Vark1119-Sep-16 2:17
Vark1119-Sep-16 2:17 
GeneralRe: Table join performance - the saga continues... Pin
JohnLBevan8-Sep-16 21:56
professionalJohnLBevan8-Sep-16 21:56 
GeneralRe: Table join performance - the saga continues... Pin
Brady Kelly8-Sep-16 22:19
Brady Kelly8-Sep-16 22:19 
GeneralRe: Table join performance - the saga continues... Pin
Jörgen Andersson9-Sep-16 1:43
professionalJörgen Andersson9-Sep-16 1:43 
Marc Clifton wrote:
table joins are "hugely expensive", particularly for reporting

Since I've been working for ten years doing exactly reporting, from databases, I call that bullshit.
Marc Clifton wrote:
a well designed database will not have this issue.

That's a must, but not all that matters. The key to performance at every stage, is to keep the amount of data down.
What you always have to keep in mind is the order of logical execution.
First the joins are done, then the filtering(WHERE), aggregation (GROUP BY), Filtering on aggregates (HAVING) and so on.
Note that the optimizer can decide to change the physical execution order if it believes it performs better.
And the most important trick I've learned is to change the order of execution using CTE's. If you filter before you join, you handle less data.
Wrong is evil and must be defeated. - Jeff Ello

GeneralRe: Table join performance - the saga continues... Pin
charlieg9-Sep-16 2:20
charlieg9-Sep-16 2:20 
GeneralRe: Table join performance - the saga continues... Pin
Richard Deeming9-Sep-16 2:27
mveRichard Deeming9-Sep-16 2:27 
GeneralRe: Table join performance - the saga continues... Pin
Middle Manager9-Sep-16 2:52
Middle Manager9-Sep-16 2:52 
GeneralRe: Table join performance - the saga continues... Pin
James Curran9-Sep-16 4:21
James Curran9-Sep-16 4:21 
GeneralRe: Table join performance - the saga continues... Pin
Ryan Peden9-Sep-16 4:26
professionalRyan Peden9-Sep-16 4:26 
GeneralRe: Table join performance - the saga continues... Pin
Kirk 103898219-Sep-16 5:01
Kirk 103898219-Sep-16 5:01 
GeneralRe: Table join performance - the saga continues... Pin
W Balboos, GHB9-Sep-16 5:40
W Balboos, GHB9-Sep-16 5:40 
GeneralRe: Table join performance - the saga continues... Pin
pboy3219-Sep-16 7:49
pboy3219-Sep-16 7:49 
GeneralRe: Table join performance - the saga continues... Pin
Bruce Patin9-Sep-16 8:20
Bruce Patin9-Sep-16 8:20 
GeneralRe: Table join performance - the saga continues... Pin
kmoorevs9-Sep-16 8:27
kmoorevs9-Sep-16 8:27 
GeneralRe: Table join performance - the saga continues... Pin
scmtim9-Sep-16 9:21
scmtim9-Sep-16 9:21 
GeneralRe: Table join performance - the saga continues... Pin
Gerry Schmitz9-Sep-16 9:31
mveGerry Schmitz9-Sep-16 9:31 
GeneralNorth Korea bans sarcasm Pin
Dan Neely8-Sep-16 10:48
Dan Neely8-Sep-16 10:48 
GeneralRe: North Korea bans sarcasm Pin
Marc Clifton8-Sep-16 10:59
mvaMarc Clifton8-Sep-16 10:59 
GeneralRe: North Korea bans sarcasm Pin
TheGreatAndPowerfulOz8-Sep-16 12:34
TheGreatAndPowerfulOz8-Sep-16 12:34 
GeneralRe: North Korea bans sarcasm Pin
jeron18-Sep-16 11:38
jeron18-Sep-16 11:38 
GeneralRe: North Korea bans sarcasm Pin
TheGreatAndPowerfulOz8-Sep-16 12:33
TheGreatAndPowerfulOz8-Sep-16 12:33 

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.