Subject Re: [Firebird-Architect] Feature Request - records before disposal
Author Dmitry Yemanov
"Nigel Weeks" <nweeks@...> wrote:
>
> Hopefully I've got this right...
> When the following query is performed on a table with 500,000 rows:
>
> select first 50 skip 50 * from table where condition = value;
>
> The entire recordset is created based on joins, where conditions, etc.

No recordset is actually created, until a sort or a merge is used at the
highest level. Usually records are fetched from tables as you request them.

> How hard would it be to add an internal conduit to the external interface
to
> give some information(namely, number of records) about the entire
recordset,
> before the skipping and first operations occured?

Jim has already answered this.

> The support appears to be in the source:...
>
> [snip]
>
> By the looks of it, 'max_records' gets incremented (+=) with each record
> falling in either the 'first' or 'skip' case sections.

This code is a part of the other (still not complete) performance related
feature.


Dmitry