ignite - Difference between Apache Ignite SQL and Scan Query?
问题描述
I'm wondering what's the difference between Ignite SQL and Scan Query, including but not limited to:
- What are strengths and weaknesses of them?
- Does Scan Query support Index like SQL?
- Is there any query optimization for SQL/Scan Query specifically?
- Performance comparison between them?
- Ignite SQL make use of H2 database to query cache, does Scan Query do it this way too? What's the way of Scan Query if not?
Thanks
解决方案
SqlQuery
- (+) Can provide better performance with proper indexes
- (+) Full power of SQL: Joins, aggregations, groupings
- (-) Requires
QueryEntity
configuration - (-) Consumes more memory for indexes and internal data structures
ScanQuery
- (+) In some cases, more flexible, since filter and transformer can contain arbitrary code
- (-) Always performs full cache scan (does not use indexes in any way)
- (-) Requires filter and transformer code (classes) to be deployed to the server nodes
I would say that SQL is the default choice for most use cases. ScanQuery is useful when filter/transformer logic can't be expressed in SQL and/or require custom method calls.
推荐阅读
- java - 循环数组列表并将匹配两个数组列表的值添加到新列表中
- c# - 获取 Youtube 播放列表中的所有 Youtube 视频,包括其持续时间
- python - 查找两个值的键
- react-native - 未定义不是函数(redux action/react native)
- java - 应用程序默认凭据无法创建 Google App Engine 服务帐户凭据
- html - xpath 条件选择一个节点或另一个节点的文本
- java - 如何在 playframework 中使用 guice 使用提供程序进行依赖注入
- sql - 从相关表中选择匹配不同条件的行
- laravel - 我如何比较 2 个雄辩的集合并从另一个中删除什么?
- sql - 如果数据重复,如何给出序列号