Commit 6e33101
committed
Fix fast analyze for PAX tables and simplify acquisition function selection
This commit addresses several issues with fast analyze:
1. For PAX tables, we now properly estimate the number of blocks by using
table_relation_estimate_size() rather than RelationGetNumberOfBlocks(),
since PAX uses non-fixed block layout. This provides more accurate
sampling for PAX tables.
2. Simplified the acquisition function selection logic by always using
gp_acquire_sample_rows_func for regular tables, removing the conditional
check for rd_tableam->relation_acquire_sample_rows. This makes the code
more straightforward and consistent.
3. Fixed an issue in datumstream.c by resetting blockRowCount when
closing a file during analyze operations.1 parent 23aef44 commit 6e33101
File tree
4 files changed
+37
-22
lines changed- src/backend
- access
- aocs
- appendonly
- commands
- utils/datumstream
4 files changed
+37
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
| 481 | + | |
| 482 | + | |
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
| 665 | + | |
666 | 666 | | |
667 | | - | |
668 | | - | |
| 667 | + | |
669 | 668 | | |
670 | 669 | | |
671 | 670 | | |
| |||
752 | 751 | | |
753 | 752 | | |
754 | 753 | | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
755 | 760 | | |
756 | 761 | | |
757 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1135 | 1141 | | |
1136 | 1142 | | |
1137 | 1143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | 361 | | |
366 | 362 | | |
367 | 363 | | |
368 | 364 | | |
369 | | - | |
370 | | - | |
| 365 | + | |
371 | 366 | | |
372 | 367 | | |
373 | 368 | | |
| |||
1716 | 1711 | | |
1717 | 1712 | | |
1718 | 1713 | | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
1719 | 1721 | | |
1720 | | - | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
1721 | 1732 | | |
1722 | 1733 | | |
1723 | 1734 | | |
| |||
2055 | 2066 | | |
2056 | 2067 | | |
2057 | 2068 | | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
| 2069 | + | |
| 2070 | + | |
2068 | 2071 | | |
2069 | 2072 | | |
2070 | 2073 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
| 879 | + | |
879 | 880 | | |
880 | 881 | | |
881 | 882 | | |
| |||
0 commit comments