Announcement

Collapse
No announcement yet.

about stored procedure to query a single replicated table

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • about stored procedure to query a single replicated table

    Do I have to partition the procedure on another unnecessary partitioned table ? Otherwise, the procedure is multi-partitioned and have performance issues.(such as global lock)

    Is this confirmed? Why can't voltdb analyze the procedure and find out only one replicated table is involved, so just pick any idle partition to execute it?

    What's the recommended way to write a stored procedure to query a single replicated table?

    Thanks in advance.

    -Xiang

  • #2
    Hi Xiang,

    If you are only reading from a replicated table in your stored procedure, VoltDB actually optimizes it to only run on a local partition without blocking any other partitions. However, the transaction will still be routed to the multi-partition coordinator.

    If you want to avoid routing it to the multi-partition coordinator and have it balanced across different partitions, you can partition the procedure and specify a different partition value each time you invoke it. This is only necessary if you invoke this procedure a lot, otherwise there shouldn't be any performance issues because of the optimization we put into place.

    --
    Ning
    Ning

    Comment


    • #3
      Hi Ning,

      Thank you very much for your prompt response.

      -Xiang

      Comment

      Working...
      X