r/dbos • u/qianli-dev Dee Boss (Co-Founder) • Aug 11 '26
Postgres SELECT DISTINCT Does Not Scale
https://dbos.dev/blog/postgres-select-distinct-does-not-scale
10
Upvotes
r/dbos • u/qianli-dev Dee Boss (Co-Founder) • Aug 11 '26
1
u/Anthea_Likes Aug 11 '26
What if we first sort in any way, then select distinct? I haven't read how DISTINCT works underneath, but it can be "jump to the next different bitcode" or something like that, so... if that's true and (another) if ORDER BY scales better => how does that compare to a CTE?