2000-01-24:对范围查询的选择性估计进行了改进

25年前的今天(PostgreSQL 7.0 开发周期),对范围查询的选择性估算进行了一项改进。

commit 0dbffa704ab3235431b4caef675d9179109d4a0c
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date:   Mon Jan 24 07:16:52 2000 +0000

    First cut at making useful selectivity estimates for range queries
    (ie, WHERE x > lowbound AND x < highbound).  It's not very bright yet
    but it does something useful. 

此提交使优化器能够识别诸如 x > 34 AND x < 42 这样的范围查询,并相应地调整选择性。在此之前,选择性会针对每个值独立计算。

在提交 7177bbac1afaa255 中对此改进进行了进一步的调整。