Chapter 15. Performance Tips

Table of Contents

15.1. Using EXPLAIN
15.1.1. EXPLAIN Basics
15.1.2. EXPLAIN ANALYZE
15.1.3. Caveats
15.2. Statistics Used by the Planner
15.2.1. Single-Column Statistics
15.2.2. Extended Statistics
15.3. Controlling the Planner with Explicit JOIN Clauses
15.4. Populating a Database
15.4.1. Disable Autocommit
15.4.2. Use COPY
15.4.3. Remove Indexes
15.4.4. Remove Foreign Key Constraints
15.4.5. Increase maintenance_work_mem
15.4.6. Increase max_wal_size
15.4.7. Disable WAL Archival and Streaming Replication
15.4.8. Run ANALYZE Afterwards
15.4.9. Some Notes about lt_dump
15.5. Non-Durable Settings
15.6. Enable SubQuery Result Cache
15.7. Adaptive work_mem
15.8. Linear Parallel workers
15.9. Plan Hint
15.9.1. Basic Usage
15.9.2. The hint table
15.9.3. Details in hinting
15.9.4. Subqueries
15.9.5. Compatible with canopy
15.9.6. Errors
15.9.7. Functional limitations
15.9.8. Limitations on the LightDB
15.9.9. Hint list

Query performance can be affected by many things. Some of these can be controlled by the user, while others are fundamental to the underlying design of the system. This chapter provides some hints about understanding and tuning LightDB performance.