SPARQL 不同与简化
SPARQL 中的 DISTINCT
和 REDUCED
有什么区别?
What is the difference between DISTINCT
and REDUCED
in SPARQL?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
SPARQL 中的 DISTINCT
和 REDUCED
有什么区别?
What is the difference between DISTINCT
and REDUCED
in SPARQL?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
REDUCED 就像是“尽力而为”的 DISTINCT。 DISTINCT保证没有重复的结果,而 REDUCED 则可以消除部分、全部重复或不消除重复。
有什么意义?那么 DISTINCT 可能会很昂贵; REDUCED 可以完成简单的重复数据删除工作(例如删除立即重复的结果),而无需记住每一行。在许多应用中这已经足够好了。
话虽如此,我从未使用过 REDUCE,我从未见过任何人使用 REDUCED,也从未见过在演讲或教程中提到 REDUCED。
REDUCED is like a 'best effort' DISTINCT. Whereas DISTINCT guarantees no duplicated results, REDUCED may eliminate some, all, or no duplicates.
What's the point? Well DISTINCT can be expensive; REDUCED can do the straightforward de-duplication work (e.g. remove immediately repeated results) without having to remember every row. In many applications that's good enough.
Having said that I've never used REDUCE, I've never seen anyone use REDUCED, and never seen REDUCED mentioned in a talk or tutorial.
在我看来(以及在我自己的 SPARQL 实现中)REDUCED 实际上是一个可选的 DISTINCT 约束,仅在引擎认为有必要时才应用,即查询引擎将决定是否根据我
自己的 查询消除重复结果如果还使用了 OFFSET/LIMIT,则仅在使用 REDUCED 时消除重复项
In my mind (and in my own SPARQL implementation) REDUCED is effectively an optional DISTINCT constraint which is only applied if the engine deems it to be necessary i.e. the query engine will decide whether or not to eliminate duplicate results based on the query
In my own implementation I only eliminate duplicates when REDUCED has been used if OFFSET/LIMIT has also been used