Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

(click on this box to dismiss)

Join between multiple Shard


I might miss this out when skimming tru the docs. How do we run query (join) accross multiple shard? if I had few tables in the join that is sharded and they are shard base on different columns, how will the performance like? any best practices or things to avoids?

link comment (0)
asked 4 years ago
84 Answers

Hello debluncz,

First of all, let me give you the link to the documentation page which explains the constraints of the CUBRID SHARD.

To summarize the documentation page, I should say that even though you can JOIN tables, the query will be executed on one shard only based on:

  • the shard_id which was derived from the shard_key you have indicated in your query
  • if shard_key is not specified in the query, the shard_id is determined by Round Robin, i.e. the query will be executed on a randomly selected shard.

This means that the result of the JOIN query will be based on the data available on the shard the query was executed on.

link comment (0)
answered 4 years ago

You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: