Subject Re: [firebird-support] What programming languages and toolkits do you use to access Firebird?
Author Milan Babuskov
Daniel Albuschat wrote:
>>> There is no way to know about
>>> row number efficiently.
>> Just wonder, why can't databases keep track internally of the count of
>> table rows, so getting the number of rows would be instant.
>> Of course there would be some overhead in doing that, but I can't imagine
>> it is much.
>
> You don't fetch tables in SQL, but you fetch records from a
> select-statement. It's not necessarily (and not even commonly) a
> single table you're fetching and it's impossible for the server to
> keep track of the result-set before it knows how and what it is going
> to fetch.

Yes, and even if it is a single whole table, there is not one one
number, because you might have a lot of transactions started, and each
transactions 'sees' a different number of rows in each table.

--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com