News for hackers. Stuff that matters.
Re:Cost of a Join by jaggederest on Tuesday August 14, 2018 @06:53PM (#17762604)
Hmm, I think these results are somewhat suspect. Postgres isn't even really hitting its stride yet at a million rows. You have to start looking at 100GB+ database sizes otherwise most everything fits in working memory, or at least the indexes do.

My experience has been that joins are, in fact, cheap in larger databases but they do scale on the size of tables, so you should be cautious about excessive joining.

In the extreme case, I wouldn't make a table for each attribute unless there were some overriding reason (at which point you've rediscovered column-based databases essentially). I do sometimes go up to 5th or DKNF normal form though, which I think is substantially beyond what most people designing or revamping a database would do.

Re:Cost of a Join by Jupe on Tuesday August 14, 2018 @08:39PM (#17763068)
Normalize till it hurts... Denormalize till it works :)
Re:Cost of a Join by lessclue on Wednesday August 15, 2018 @03:16AM (#17764249)
Golden words. This is the cycle that keeps repeating in complex production systems.
Re:Cost of a Join by dotancohen on Wednesday August 15, 2018 @12:56AM (#17763856)
This is actually terrific advice. Thanks!