Partitioned tables and update statistics

Did you know that if you have a partitioned table, that running your normal update statistics or update index statistics does not update the statistics for the partitions?  Many dbas forget to perform update partition statistics on their partitions.  Sadly, neither Sybase or Rob Verschoor say much about it.  This is rather surprising as Rob is full of useful information about such things.

Of course, you could just run update all statistics but the overhead of maintaining the statistics is a nightmare and I have yet to find any real reason to do so.

Syntax (v12.x): 

update partition statistics table_name  [partition #]

Syntax (v15.x):

update table statistics table_name [partition name]
Share Button