db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Tripp" <dtr...@mdisolutions.com>
Subject RE: A fast row count with DatabaseMetaData.getIndexInfo() / tableIndexStatistic / CARDINALITY?
Date Mon, 05 May 2008 16:53:25 GMT
That's an idea but I don't think it would be appropriate for my project,
since the code that is doing this row-counting is executed rarely.  Thanks
though.
 

-----Original Message-----
From: Bryan Pendleton [mailto:bpendleton@amberpoint.com] 
Sent: May 3, 2008 11:43 AM
To: Derby Discussion
Subject: Re: A fast row count with DatabaseMetaData.getIndexInfo() /
tableIndexStatistic / CARDINALITY?

> - any alternate way of achieving my goal of a fast row count

How accurate does your count need to be? One idea would be to set up some
sort of periodic background task which computes the current sizes of your
tables and stores that information in another table in your database.

Then, when you needed the count, you could simply read it from your
stored-counts table.

You could adjust the frequency of the background task to improve the
accuracy of the count.

thanks,

bryan


Mime
View raw message