IBM Support

How does DB2 come up with the access plan when instance gets restarted and if one or more table in the query does not have statistics on it?

Technical Blog Post


Abstract

How does DB2 come up with the access plan when instance gets restarted and if one or more table in the query does not have statistics on it?

Body

If  RTS (real time statistics)  is enabled then DB2 will collect the statistics internally.

If no  RTS is used then it  will use whatever statistics  were present  from before  when a  statistics  was collected last.
If the  table never had  statistics  then it  requests the storage layer to tell  the physical size of the table. Then  it will use the physical size, coupled with the UDI  (Update Delete Insert) counter, to fabricate statistics.
A  fabrication  is not  same  as  running a  real   runstats.
So,  with statistics fabrication a  possibility of  sub-optimal access  plan  is more common.
 

[{"Business Unit":{"code":"BU029","label":"Data and AI"}, "Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11140832