SAP HANA pushdown limit

not possible if DISTINCT is used even if the hint PRELIMIT_BEFORE_JOIN is applied.
SAP HANA pushdown limit
The limit pushdown for parameter value is triggered only if the above hint is given.HANA optimizer is not rule-based but cost-based optimizer.
On other DBs we always had the possibility to specify something like an optimization target “optimize for first rows”, which means that the optimizer should choose a plan, which is optimal for a small number of records.
PRELIMIT_BEFORE_JOIN rule can be applied to constant LIMIT operator. But cannot be applied to parameterized LIMIT cases for technical reason, unless we are well aware of how much records could be pruned with LIMIT operator, we cannot estimate its cost and decide the optimal plan based on the estimated cost.
SAP HANA pushdown limit

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
SAP HANA pushdown limit