Subject Re: Why it's soo slow ? it's just a very simple select ...
Author hvlad
--- In firebird-support@yahoogroups.com, "David Hollings" wrote:
...
> Conclusion:
>
> Baffled why a select (which could never possibly return a result) reads
> ~1150 pages from DESC_VARCHAR but only ~230 pages from DESC_EMPTY given that
> the two indices on IDOBJ columns are virtually identical (identical data,
> identical fills etc).

Could you, please, count numbers of pointer pages for both relations, please ?

Just run this query and show us results:

SELECT R.RDB$RELATION_NAME, COUNT(*)
FROM RDB$PAGES PG JOIN RDB$RELATIONS R
ON PG.RDB$RELATION_ID = R.RDB$RELATION_ID
WHERE PG.RDB$PAGE_TYPE = 4
AND R.RDB$RELATION_NAME IN ('DESC_VARCHAR', 'DESC_EMPTY')
GROUP BY R.RDB$RELATION_NAME


Also, could you repeat the test using bigger page cache, say > 1200 pages ?

Regards,
Vlad