| Server IP : 104.21.25.180 / Your IP : 104.23.197.122 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/postgresql-docs/html/ |
Upload File : |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 69. How the Planner Uses Statistics</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="[email protected]" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="bki-example.html" title="68.4. Example" /><link rel="next" href="row-estimation-examples.html" title="69.1. Row Estimation Examples" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Chapter 69. How the Planner Uses Statistics</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="bki-example.html" title="68.4. Example">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="internals.html" title="Part VII. Internals">Up</a></td><th width="60%" align="center">Part VII. Internals</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 10.23 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="row-estimation-examples.html" title="69.1. Row Estimation Examples">Next</a></td></tr></table><hr></hr></div><div class="chapter" id="PLANNER-STATS-DETAILS"><div class="titlepage"><div><div><h2 class="title">Chapter 69. How the Planner Uses Statistics</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="row-estimation-examples.html">69.1. Row Estimation Examples</a></span></dt><dt><span class="sect1"><a href="multivariate-statistics-examples.html">69.2. Multivariate Statistics Examples</a></span></dt><dd><dl><dt><span class="sect2"><a href="multivariate-statistics-examples.html#id-1.10.22.5.3">69.2.1. Functional Dependencies</a></span></dt><dt><span class="sect2"><a href="multivariate-statistics-examples.html#id-1.10.22.5.4">69.2.2. Multivariate N-Distinct Counts</a></span></dt></dl></dd><dt><span class="sect1"><a href="planner-stats-security.html">69.3. Planner Statistics and Security</a></span></dt></dl></div><p> This chapter builds on the material covered in <a class="xref" href="using-explain.html" title="14.1. Using EXPLAIN">Section 14.1</a> and <a class="xref" href="planner-stats.html" title="14.2. Statistics Used by the Planner">Section 14.2</a> to show some additional details about how the planner uses the system statistics to estimate the number of rows each part of a query might return. This is a significant part of the planning process, providing much of the raw material for cost calculation. </p><p> The intent of this chapter is not to document the code in detail, but to present an overview of how it works. This will perhaps ease the learning curve for someone who subsequently wishes to read the code. </p></div><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bki-example.html" title="68.4. Example">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="internals.html" title="Part VII. Internals">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="row-estimation-examples.html" title="69.1. Row Estimation Examples">Next</a></td></tr><tr><td width="40%" align="left" valign="top">68.4. Example </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 10.23 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 69.1. Row Estimation Examples</td></tr></table></div></body></html>