db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mike matrigali <mikema...@gmail.com>
Subject Re: no records in sys.sysstatistics
Date Fri, 09 Aug 2013 15:50:49 GMT
On 8/8/2013 6:19 PM, Katherine Marsden wrote:
> On 8/8/2013 3:13 PM, Jasmeet Bhatia (jasmbhat) wrote:
>> I have in-memory derby.
>> I am trying to verify if indexes are being used in my query. But I
>> notice that there are no statistics in the sys statistics table. Any
>> ideas what is going on?
>> Jasmeet Bhatia
> With 10.8 statistics update is automatic.
do note for the "automatic" to kick in you need to do a query on the 
table and then they will show up later.  So if you load your db from
scratch for testing and look there may be no stats initially.  If you
are able to control the order in your application it is best to
load data first and then create indexes and primary keys.  Then the
stats are automatically created as part of creating the supporting
indexes.  And will be there for your initial query.

Of course this does not work if your app needs to start with empty
tables and data comes in later.
> With 10.7 you can create/update statistics with the
> http://db.apache.org/derby/docs/10.7/ref/rrefupdatestatsproc.html
> or by compressing the tables:
> http://db.apache.org/derby/docs/10.7/ref/rrefaltertablecompress.html
> Thanks
> Kathey

View raw message