forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1f171a1
committed
Fix thinko in estimate_num_groups
The code for the reworked n-distinct estimation on commit7b504eb waswritten differently in a previous version of the patch, prior to commit;on rewriting it, we missed updating an initializer. This caused thecode to (mistakenly) apply a fudge factor even in the case where asingle value is applied, leading to incorrect results.This means that the 'relvarcount' variable name is now wrong. Add acomment to try and make the situation clearer, and remove an incorrectcomment I added.Problem noticed, and code patch, by Tomas Vondra. Additional commentaryby Álvaro.1 parent827d6f9 commit1f171a1
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3404 | 3404 |
| |
3405 | 3405 |
| |
3406 | 3406 |
| |
3407 |
| - | |
| 3407 | + | |
3408 | 3408 |
| |
3409 | 3409 |
| |
3410 | 3410 |
| |
| |||
3436 | 3436 |
| |
3437 | 3437 |
| |
3438 | 3438 |
| |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
3439 | 3443 |
| |
3440 | 3444 |
| |
3441 | 3445 |
| |
| |||
3447 | 3451 |
| |
3448 | 3452 |
| |
3449 | 3453 |
| |
3450 |
| - | |
| 3454 | + | |
3451 | 3455 |
| |
3452 | 3456 |
| |
3453 | 3457 |
| |
|
0 commit comments
Comments
(0)