Click here to Skip to main content
15,905,867 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
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 
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 
Marc,
Column counts are a huge issue. I can't stand "Select *" for anything more than debugging!
I was called in to help fix an Oracle Speed Issue. The result was a query that brought back 10,000 times less data! They were doing "Select *" on a 200 column table, joined with 2 other tables. Where they needed 12 columns. And they were looking at the "full table scans".
(imagine 12 columns that fit on a 80 character wide screen. Imagine retrieving at least 4 varchar(4000) fields with each row. Fields that NOBODY wanted, NOBODY needed. But it was easier to write * instead of determine the 12 fields up front. OMG.)

Of course you are going to do full table scans. You ASKED for every column of a LOT of rows. In fact, forcing an index scan, caused the query to run slower, as I showed them.

But reducing the column count of the data coming back, and measuring the data size that came back to the program, they SAW the bottleneck.

I am not all BCNF or 3NF. Denormalization makes sense at times.

The "It Depends" answer is simply this: You should create the DB and the queries you are going to use to get to ALL of the data and reports before you build the system. If the queries you run 100,000 times a day require 15 joins, and the queries that you run once a month are trivial, you may have optimized the wrong end of the equation.

Finally, creating materialized views, or reporting snapshots are QUITE reasonable things to do.
The correct format for data while processing MAY NOT be the correct format for data while reporting.

In an OLTP type system, constantly joining across many tables that are constantly being updated will produce HORRIBLE performance if writes block reads, or UNDO/REDO contention exists.

Thanks for that link. A great article. I saved it!

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 
GeneralRe: North Korea bans sarcasm Pin
Richard Deeming9-Sep-16 2:31
mveRichard Deeming9-Sep-16 2:31 
GeneralRe: North Korea bans sarcasm Pin
Kirk 103898219-Sep-16 5:17
Kirk 103898219-Sep-16 5:17 
GeneralRe: North Korea bans sarcasm Pin
Dan Neely9-Sep-16 5:22
Dan Neely9-Sep-16 5:22 
GeneralRe: North Korea bans sarcasm Pin
Kirk 103898219-Sep-16 5:37
Kirk 103898219-Sep-16 5:37 
GeneralScrap Pin
User 48350478-Sep-16 8:55
User 48350478-Sep-16 8:55 
GeneralRe: Scrap Pin
Nelek8-Sep-16 9:15
protectorNelek8-Sep-16 9:15 

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.