查看BI日志,可知BI拼接sql下放到数据库中查询的格式是select * from (select * from table order by sort_key) limit 25 offset 0;
图片看不清,下面这段为日志复制出来的
SELECT "PAGE_SUB2_"."主键" AS "主键", "PAGE_SUB2_"."文本" AS "文本" FROM (SELECT "id" AS "主键", "text" AS "文本"FROM dw.test1ORDER BY "主键" ASC) "PAGE_SUB2_" LIMIT 25 OFFSET 0
从这sql中知道,排序放在子查询中执行后再分页,但这种sql在greenplum数据库执行时不会进行sort。