refactor: increase the buffer for each agg operator, and make the pointer attributes in SColumnInfoData to be aligned to 8bit in memory to speedup the execution of memmove & memset.

This commit is contained in:
Haojun Liao 2022-11-03 10:47:55 +08:00
parent 53e1c19acb
commit e83159f0d9
2 changed files with 6 additions and 4 deletions

View File

@ -225,13 +225,13 @@ typedef struct SVarColAttr {
// pBlockAgg->numOfNull == info.rows, all data are null
// pBlockAgg->numOfNull == 0, no data are null.
typedef struct SColumnInfoData {
SColumnInfo info; // column info
bool hasNull; // if current column data has null value.
char* pData; // the corresponding block data in memory
union {
char* nullbitmap; // bitmap, one bit for each item in the list
SVarColAttr varmeta;
};
SColumnInfo info; // column info
bool hasNull; // if current column data has null value.
} SColumnInfoData;
typedef struct SQueryTableDataCond {

View File

@ -2783,8 +2783,10 @@ int32_t getBufferPgSize(int32_t rowSize, uint32_t* defaultPgsz, uint32_t* defaul
*defaultPgsz <<= 1u;
}
// The default buffer for each operator in query is 10MB.
// at least four pages need to be in buffer
*defaultBufsz = 4096 * 256;
// TODO: make this variable to be configurable.
*defaultBufsz = 4096 * 2560;
if ((*defaultBufsz) <= (*defaultPgsz)) {
(*defaultBufsz) = (*defaultPgsz) * 4;
}