Jump to content

shards on different ways


dantro

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.