markdown/admin/maintain.html.md.erb (9 lines of code) (raw):
---
title: Routine System Maintenance Tasks
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## <a id="overview-topic"></a>Overview
To keep a HAWQ system running efficiently, the database must be regularly cleared of expired data and the table statistics must be updated so that the query optimizer has accurate information.
HAWQ requires that certain tasks be performed regularly to achieve optimal performance. The tasks discussed here are required, but database administrators can automate them using standard UNIX tools such as `cron` scripts. An administrator sets up the appropriate scripts and checks that they execute successfully. See [Recommended Monitoring and Maintenance Tasks](RecommendedMonitoringTasks.html) for additional suggested maintenance activities you can implement to keep your HAWQ system running optimally.
## <a id="topic10"></a>Log File Maintenance
Every database instance in HAWQ \(master and segments\) runs a PostgreSQL database server with its own server log file. For information about managing these log files, refer to [HAWQ Database Server Log Files](logfiles.html#topic28).
Log files are also generated when you invoke HAWQ management utilities such as `hawq start` and `gpfdist`. [Management Utility Log Files](logfiles.html#mgmtutil_log) provides information and maintenance strategies for these log files.