setOffsetOptimizingThreshold

fun setOffsetOptimizingThreshold(threshold: Int)

For RDBMS, pagination is slow if offset is large, especially for MySQL.

If offset>= $thisArgument

{@code
select t.* from Table t ... limit ? offset ?
}

will be automatically changed to

{@code
select t.* from (
    select
        t.id as optimized_core_id_
    from Table t ... limit ? offset ?
) optimized_core_
inner join Table as optimized_
    on optimized_.optimized_core_id_ = optimized_core_.optimized_core_id_
}

Return

An integer which is greater than 0