Patent ID: 8990169
Filing Date: 2015-03-24
Classification: G06F

Abstract:
1. A method for collecting statistics on database tables, the method comprising: identifying a plurality of local tables and a plurality of nicknames for statistics collection in accordance with a statistics collection policy, wherein each table of the plurality of local tables is located on a local server and is remote from a plurality of remote tables located on a remote server, wherein the plurality of remote tables are mapped onto objects on the local server via the plurality of nicknames, wherein the statistics collection policy includes a first reason for collecting the plurality of local tables and a second reason for collecting the plurality of nicknames, wherein the first reason comprises collecting the plurality of local tables based on update/delete/insert (UDI) counts and the second reason comprises collecting the plurality of nicknames by comparing both a remote STATS TIME and a maximum STATS TIME to a local STATS TIME, wherein the plurality of nicknames are collected if the remote STATS TIME and the maximum STATS TIME is more recent than the local STATS TIME; examining at least one attribute for each table and nickname of the plurality of local tables and the plurality of nicknames identified for the statistics collection; prioritizing the plurality of local tables and the plurality of nicknames for the statistics collection based on the examining to create a priority sequence; collecting statistics on each table and nickname of the plurality of local tables and the plurality of nicknames identified for the statistics collection in accordance with the priority sequence; and automatically synchronizing the collected statistics, wherein local nickname statistics metadata are automatically synchronized with corresponding statistics metadata in the plurality of remote tables.