setPageSize

API definition

void setPageSize(uint16_t pageBlockNum);

Function

Sets the number of blocks that can be continuously computed at a time during search.

Input

uint16_t pageBlockNum: number of blocks that can be continuously computed at a time. If this parameter is not set, 16 blocks are continuously computed at a time by default. The size of a block storage vector is determined by blockSize in AscendIndexInt8FlatConfig. A larger value indicates that more memory is occupied during search.

Output

N/A

Return value

N/A

Restrictions

  • Value range of pageBlockNum: 0 < pageBlockNum ≤ 144
  • This API is used to optimize the performance of the search API for a large database. A larger value indicates that more preset memory specified by resourceSize in AscendIndexInt8FlatConfig is occupied. You are advised to allocate sufficient preset memory and then use this API to optimize parameters.