cck字段和文本之间的Drupal Performance差异?
您认为性能差异是什么?
20,000 个节点
每个节点都有一个 Link 字段。值的数量范围为 50 到 200。链接没有标题。
或
20,000 个节点
每个节点将在正文字段中包含带有过滤 html 的纯文本链接。就这样:
http://link1.com
http://link2.com
http://link3.com
http://link4.com
http://link5.com
http://link6.com
http://link7.com
http://link8.com
http://link9.com
http://link10.com
What do you think the performance difference would be?
20,000 nodes
Each node has a Link field. The number of values range from 50 to 200. The Links will have no title.
OR
20,000 nodes
Each node will have the links in the body field as straight text with filtered html. As so:
http://link1.com
http://link2.com
http://link3.com
http://link4.com
http://link5.com
http://link6.com
http://link7.com
http://link8.com
http://link9.com
http://link10.com
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这实际上取决于您将如何/使用它们。我怀疑您是否会一次显示 20.000 个节点。如果没有特定的用例,很难对性能说太多,即使如此,您也必须考虑缓存以及不考虑的因素。
无论如何,CCK 可能总是会慢一点,因为您提取的是多个值而不是单个值,这使得查询稍微复杂一点。我怀疑你是否能够在你的 drupal 网站上测量它。
另一件需要记住的事情是,使用 CCK 字段将为您提供更大的灵活性,它与视图集成得很好。因此,您可以轻松地提取链接并以不同的方式格式化它们。
It really depends how/what you are going to use them. I doubt you are going to display 20.000 nodes at once. It's really hard to say much about performance, without a specific use case, and even then, you have to take caching and what not into consideration as well.
In any regard, CCK will probably always be a tiny bit slower, because you are extracting multiple values instead of a single value, which makes the query a tiny bit more complex. I doubt that you will be able to measure that on your drupal site though.
Another thing to keep in mind, is that using CCK fields will give you added flexibility, is it integrates well with views. So you can easily pull out the links and format them in different ways.