Skip to content

开启异步分页,在DB2数据库中执行异步count,语句中包含fetch first 1000 rows only时候,会出现总数对不上的问题 #189

@zhaodengfeng1989

Description

@zhaodengfeng1989

1 数据库使用db2,开启异步查询
2.语句类似 select xx from xxx表 fetch first 1000 rows only,在开启异步查询时候,count语句拼接的逻辑是直接将前半部分替换为
select count(0) from xxx表 fetch first 1000 rows only,导致查询出的total总数错误;
如果原来的条数超过1000,实际上返回的是1000,而开启异步后,执行语句变成了将count结果fetch 1000条,改变了原语句的执行结果,导致实际总数和原查询总数对应不上。
3. 此问题异步和非异步都存在;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions