Commit 305a9c1
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 635c06f commit 305a9c1
File tree
2 files changed
+21
-17
lines changed- src/backend
- commands
- utils/datumstream
2 files changed
+21
-17
lines changed| 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