Skip to content

Optimize dist move op in VoltDB #336

Closed
@gangliao

Description

@gangliao

The distributed move operation is now too sluggish in VoltDB. We can use SQL syntax instead of recursive iteration (in stored procedure) to obtain all children of a subtree from a distributed environment (multi-nodes): STARTS WITH subtree_parent_name

The STARTS WITH clause is useful in stored procedures because it uses indexed scans where the LIKE clause cannot. The expression STARTS WITH '{string-expression}' is syntactically identical to LIKE '{string-expression}%' in that it matches any string value that starts with string-expression. The difference is that in a stored procedure, use of the STARTS WITH clause with a placeholder (that is, "START WITH ?") utilizes available indexes, whereas LIKE ? requires a sequential scan, since the compiler cannot tell if the replacement text ends in a percent sign or not and must plan for any possible string value.

In Apache Ignite, I did it the same manner. It's extremely fast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions