`dolt_diff` table function much slower with `order by` for big diffs
Author: tbantle22Created Sep 29, 2026Updated Sep 29, 2026
Labelssqlperformanceversion control
On the hosted workbench, we paginate row diffs with the query `select * from dolt_diff(...) order by to_<pk>, from_<pk> limit 51 offset 0`. For large diffs, getting the first page times out. However, if I remove the `order by`, the query returns almost immediately
Source: dolthub/dolt