Re: [HACKERS] libpq: why we need to fetch all rows? - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] libpq: why we need to fetch all rows?
Date
Msg-id be3debd4333948256fc0b79db346652d
Whole thread Raw
In response to [HACKERS] libpq: why we need to fetch all rows?  (Alexander Demenshin <aldem@techie.com>)
List pgsql-hackers
>   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

------------------------------

pgsql-hackers by date:

Previous
From: John Robinson
Date:
Subject: Re: [HACKERS] Case sensitivity in identifiers
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Case sensitivity in identifiers