Subject | RE: [firebird-support] SELECT COUNT(*) FROM :PARAMTABLE |
---|---|
Author | Alan McDonald |
Post date | 2004-02-12T10:39:10Z |
> I want to get the database statistics. I have 20 Tables and IWell first of all you will find the table names in this query
> want to get the record counts of tables
> I tried to get the tablenames from rdb$xxxxxx but I couldnot
> find. Is there a way to do this?
SELECT RDB$RELATION_NAME FROM RDB$RELATIONS
WHERE RDB$RELATION_NAME NOT LIKE 'RDB$%'
>Secondly, FB does not accept DDL objects as parameters so, no, this query
> And,
>
> SELECT COUNT(*) FROM :PARAMTABLE
>
> This Query is not working. Is there a way to write a SP for this?
>
will not work. But you can use execute statement command to do this.
Third, yes you can write a an SP to do this too.
Finally, please forgive me but I hope you don't intend to use this command
fruently in your application becuase you willnot be satisfied with the speed
of execution at all.
We often see this coming from people who move from destop databases where
they rely on record numbers a lot. In SQL dbs we do not rely on this as part
of operations.
Alan