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:
parent
53e1c19acb
commit
e83159f0d9
|
@ -225,13 +225,13 @@ typedef struct SVarColAttr {
|
||||||
// pBlockAgg->numOfNull == info.rows, all data are null
|
// pBlockAgg->numOfNull == info.rows, all data are null
|
||||||
// pBlockAgg->numOfNull == 0, no data are null.
|
// pBlockAgg->numOfNull == 0, no data are null.
|
||||||
typedef struct SColumnInfoData {
|
typedef struct SColumnInfoData {
|
||||||
SColumnInfo info; // column info
|
char* pData; // the corresponding block data in memory
|
||||||
bool hasNull; // if current column data has null value.
|
|
||||||
char* pData; // the corresponding block data in memory
|
|
||||||
union {
|
union {
|
||||||
char* nullbitmap; // bitmap, one bit for each item in the list
|
char* nullbitmap; // bitmap, one bit for each item in the list
|
||||||
SVarColAttr varmeta;
|
SVarColAttr varmeta;
|
||||||
};
|
};
|
||||||
|
SColumnInfo info; // column info
|
||||||
|
bool hasNull; // if current column data has null value.
|
||||||
} SColumnInfoData;
|
} SColumnInfoData;
|
||||||
|
|
||||||
typedef struct SQueryTableDataCond {
|
typedef struct SQueryTableDataCond {
|
||||||
|
|
|
@ -2783,8 +2783,10 @@ int32_t getBufferPgSize(int32_t rowSize, uint32_t* defaultPgsz, uint32_t* defaul
|
||||||
*defaultPgsz <<= 1u;
|
*defaultPgsz <<= 1u;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The default buffer for each operator in query is 10MB.
|
||||||
// at least four pages need to be in buffer
|
// 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)) {
|
if ((*defaultBufsz) <= (*defaultPgsz)) {
|
||||||
(*defaultBufsz) = (*defaultPgsz) * 4;
|
(*defaultBufsz) = (*defaultPgsz) * 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue