5 ms·
Standard rules about performance optimization apply. Denormalization can improve performance, but it can just as easily harm it. For code, I think by now we al
by bunderbunder 8y ago
Standard rules about performance optimization apply. Denormalization can improve performance, but it can just as easily harm it.
For code, I think by now we all understand that you should always start with clean, well-factored code, and then optimize only as much as is necessary, which is usually not at all, and always under profiler guidance. It's the same with DBs: You start with a clean, well-normalized schema, and then de-normalize only as much as is necessary, which is usually not at all, and always under profiler guidance.
Also, keep in mind that improvements in compiler technology over time mean that the performance tricks of old can be useless or even actively harmful nowadays. This is true of SQL every bit as much as C.