News for hackers. Stuff that matters.
Re:A terrible schema from a clueless programmer by silisili on Sunday November 07, 2021 @10:36AM (#29140287)
I think it depends a lot on the data. If those values like IP, From, To, etc keep repeating, you save a lot of space by normalizing it as she did.

But strictly from a performance aspect, I agree it's a wash if both were done correctly.

Re:A terrible schema from a clueless programmer by philliphaydon on Sunday November 07, 2021 @10:44AM (#29140361)
Space is cheap now tho. Better to duplicate some data and avoid a bunch of joins than to worry about saving a few gb of space.
Re:A terrible schema from a clueless programmer by acdha on Sunday November 07, 2021 @10:49AM (#29140414)
It’s not that easy: you need to consider the total size and cardinality of the fields potentially being denormalized, too. If, say, the JOINed values fit in memory and, especially, if the raw value is much larger than the key it might be the case that you’re incurring a table scan to avoid something which stays in memory or allows the query to be satisfied from a modest sized index. I/O isn’t as cheap if you’re using a SAN or if you have many concurrent queries.
Re:A terrible schema from a clueless programmer by kasey_junk on Sunday November 07, 2021 @10:46AM (#29140381)
This system was written in 2002.
Re:A terrible schema from a clueless programmer by wvenable on Sunday November 07, 2021 @01:30PM (#29142065)
Using space to avoid joins will not necessarily improve performance in an RDBMS -- it might even make it worse.
Re:A terrible schema from a clueless programmer by philliphaydon on Sunday November 07, 2021 @11:09PM (#29146060)
The inverse of your statement is also true. Denormalizing the database to avoid duplicating data will not necessarily improve performance in an RDBMS - it might even make it worse.