Subject | Re: [firebird-support] What programming languages and toolkits do you use to access Firebird? |
---|---|
Author | (no author) |
Post date | 2008-09-30T17:20:37Z |
Thanks, will try that.
I don't need the exactl number; only a rough
estimate of the total rows in a table.
RBS
I don't need the exactl number; only a rough
estimate of the total rows in a table.
RBS
> Perhaps something like the following would work for you
>
> -- This wil only work on tables that have a primary key.
> UPDATE RDB$INDICES SET RDB$STATISTICS = -1;
> COMMIT;
>
> /* Display table names and record counts */
> SELECT RDB$RELATIONS.RDB$RELATION_NAME,
> CASE WHEN RDB$INDICES.RDB$STATISTICS = 0 THEN 0 ELSE
> CAST(1 / RDB$INDICES.RDB$STATISTICS AS INTEGER) END
> FROM RDB$RELATIONS
> LEFT JOIN RDB$RELATION_CONSTRAINTS ON
> RDB$RELATIONS.RDB$RELATION_NAME =
> RDB$RELATION_CONSTRAINTS.RDB$RELATION_NAME
> AND RDB$CONSTRAINT_TYPE = 'PRIMARY KEY'
> LEFT JOIN RDB$INDICES ON
> RDB$RELATION_CONSTRAINTS.RDB$INDEX_NAME = RDB$INDICES.RDB$INDEX_NAME
> WHERE RDB$VIEW_BLR IS NULL AND
> RDB$RELATION_ID >= 128
> ORDER BY 1;
>
> its not 100% accurate but might be what your looking for
>
> rgds
>
> Si
>
> On Tue, Sep 30, 2008 at 5:14 PM, <bartsmissaert@...> wrote:
>>> I wonder if you know that the X table
>>> have 6349865 records make you more happy!
>>
>> It would help me.
>>
>> RBS
>