我试图坚持使数据库规范化的做法,但这导致需要运行多个联接查询.如果许多查询使用联接而不是调用可能包含冗余数据的单个表,会不会导致性能下降?
I am trying to stick to the practice of keeping the database normalized, but that leads to the need to run multiple join queries. Is there a performance degradation if many queries use joins vs having a call to a single table that might contain redundant data?
推荐答案保持数据库规范化,直到您发现瓶颈.然后,只有在仔细分析后,您才能规范化.
Keep the Database normalised UNTIL you have discovered a bottleneck. Then only after careful profiling should you denormalise.
在大多数情况下,拥有良好的索引覆盖范围和最新的统计信息将解决大多数性能和阻塞问题,而不会进行任何非规范化.
In most instances, having a good covering set of indexes and up to date statistics will solve most performance and blocking issues without any denormalisation.
如果对表进行写入和读取操作,则使用单个表可能会导致性能下降.
Using a single table could lead to worse performance if there are writes as well as reads against it.
更多推荐
SQL连接与单个表:性能差异?
发布评论