forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit29cf61a
committed
Consider fillfactor when estimating relation size
When table_block_relation_estimate_size() estimated the number of tuplesin a relation without statistics (e.g. right after load), it did notconsider fillfactor when calculating density. With non-defaultfillfactor values, this may result in significant overestimate of thenumber of tuples - up to 10x with the minimum 10% fillfactor. This mayhave unexpected consequences, e.g. when creating hash indexes.This considers the current fillfactor value in the "no statistics" codepath. If the fillfactor changes after loading data into the table, theestimate may be off. But that seems much less likely than changing thefillfactor before the data load.Reviewed-by: Corey Huinker, Peter EisentrautDiscussion:https://postgr.es/m/cf154ef9-6bac-d268-b735-67a3443debba@enterprisedb.com1 parent087a933 commit29cf61a
1 file changed
+9
-1
lines changedLines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
737 | 737 |
| |
738 | 738 |
| |
739 | 739 |
| |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
740 | 748 |
| |
741 | 749 |
| |
742 | 750 |
| |
743 | 751 |
| |
744 |
| - | |
| 752 | + | |
745 | 753 |
| |
746 | 754 |
| |
747 | 755 |
| |
|
0 commit comments
Comments
(0)