Subject | Re: [Firebird-Architect] Inexact database operations |
---|---|
Author | Nando Dessena |
Post date | 2005-07-01T07:18:12Z |
Ann,
A> The optimizer gets an approximate record count for calculating inexact
A> costs by counting the number of pointer pages (from RDB$PAGES)
A> multiplying it by the number of data pages per pointer page (fixed for
A> each page size) multiplying the result by (the size of a page / byte
A> length of records). It's imprecise, but "good enough".
This is fine for an entire table; the problem is applying it to a
filtered resultset. I can't see how to efficiently count records (even
imprecisely) without materializing them; could it be done?
Ciao
--
Nando Dessena
http://www.flamerobin.org
A> The optimizer gets an approximate record count for calculating inexact
A> costs by counting the number of pointer pages (from RDB$PAGES)
A> multiplying it by the number of data pages per pointer page (fixed for
A> each page size) multiplying the result by (the size of a page / byte
A> length of records). It's imprecise, but "good enough".
This is fine for an entire table; the problem is applying it to a
filtered resultset. I can't see how to efficiently count records (even
imprecisely) without materializing them; could it be done?
Ciao
--
Nando Dessena
http://www.flamerobin.org