Skip to content

primary_index_fieldno_map is not cached #243

Open
@ligurio

Description

@ligurio
local function extract_from_index(primary_key, primary_index_parts, sharding_key_as_index_obj)
    dev_checks('table', 'table', 'table')

    local primary_index_fieldno_map = utils.get_index_fieldno_map(primary_index_parts)

We re-calculate this map on each request. At least, please, mark it as possible speed up headroom: we can cache this value.

As an option, we can do this right in the shadring key definitions fetching code and get rid of the primary_index_parts argument in sharding_key_module.extract_from_pk().

#181 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions