So, assuming @Vitaliy Serdtsev and @Robert Cemper answers we have:
Index ext [type = bitmap; Extent];Is the must for every Persistent class, with standard ID, if we want to have fast answer on "How many records"
And the easiest and fastest "How many records" in this case is:
ClassMethod HowManyRecords(ByRef recordsCount as %Integer) As %Status
{
&sql(SELECT Count(1) INTO :recordsCount FROM schema_package.table)
IF SQLCODE<0 {WRITE "SQLCODE error ",SQLCODE," ",%msg QUIT}
}
- Log in to post comments




