> Currently libpq works as follows:
>
> If we doing a select, all rows fetched in memory, after this
> it returned to the caller.
>
> All OK, but: if number of rows is too big, we use a LOT of memory.
>
> And, if select scans large table, we get first result after long
> (relatively ;) time...
>
> Many SQL servers will return rows as soon as it found (ASAF), and this
> behavior is more friendly - human don't need to wait before
> first result is appears.
I don't think that this can possibly work for a true multi-user RDBMS.
At any point during row fetches to satisfy a query, something could
abort the transaction (e.g. deadlock if doing row or page level locking,
or finding an invalid internal value). If you've already started
returning rows, you can't gracefully abort the operation.
Please give examples of true RDBMS SQL servers which return rows before
completing the database scan.
- Tom
------------------------------