> In my case with 100 000 000 records, the query is never finished. The DBMS just kills it. Why? Probably, because it led to the attempt to load the whole table into RAM.
What? Why? It should just instantiate a cursor and return the first batch size worth of records.
I’m not sure why the dB pulls load the entire result set into ram to return results unless it requires a sort on a non indexed field.