Jump to content

Recommended Posts

hello

 

i have a big problem dealing with shards.

i would be pleased to get your ideas and practical

solutions to my problem.

 

imagine following scenario:

 

i have 5 mysql shards, sharded by primary key.

 

shard #1 (id 1-1,000,000)

shard #2 (id 1,000,001-2,000,000)

shard #3 (id 2,000,001-3,000,000)

shard #4 (id 3,000,001-4,000,000)

shard #5 (id 4,000,001-5,000,000)

 

that way it is pretty easy to build a application to

connect to the right shard if i have the id.

 

now the problem:

what do you do, if you consider to get your entries if

you don't use primary key id. for example you want to

get the entries by another key (date for example).

 

do you have any ways to build appropriate keys to get

your data on different ways out of shards ?

 

please help me..

i hope someone already did something like that.

 

what do you do if you sharded your data on different

physical machines and want to get the data our on

different ways.

 

 

 

thank you very much

dan

Link to comment
https://forums.phpfreaks.com/topic/130857-shards-on-different-ways/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.