Subject Re: [IBO] How to know the size of result set before fetching?
Author Svein Erling Tysvær
Eyal wrote:
>> I thought that RowsSelected is supposed to reflect that number of
>> rows in the result set on the server. Apparently it does something
>> else.

Lester answered:
>I THINK that is a count of the rows in a multiple select subset of
>the data.

I think it is mainly used for TIB_Queries (I don't know about the TIBO
components) attached to a TIB_Grid. In the TIB_Grid you can select one
or more rows, and the number of selected rows I expect to find in
RowsSelected.

Eyal further wrote:
> After a client issues a query the server processes it and produces a
> result set. I'm not really familiar with the innerworkings of IB/FB,
> but as far as I understand, a final result set must be prepared
> before a single row can be transferred to the client.

What you prepare is the query statement, explaining how Firebird will
go about fetching the result set. Judging from the time it takes to
return rows, it is only sometimes (when it doesn't sort and doesn't
use indexes for the sorting) that it has to know the entire result set
before starting to return rows.

Set