English is not my first language either. 😂

Reference https://en.wikipedia.org/wiki/Shard_(database_architecture)

A table like this
user(id, name, phone, email)

I got three MySQL host a,b,c.
Shared by id, choose mysql[id%3] to save a row.

Use H2 as a middleware

Query -> *H2* -> Choose One MySQL

e.g.

select * from user where id=1
This query will route to mysql[1%3 = 1] = b mysql host

select * from user where id=9
This will route to id mysql[9 % 3] = a mysql host




在 2015年3月12日星期四 UTC+8下午2:44:21,Thomas Mueller写道:
>
> Hi,
>
> Sorry I don't understand the use case.
>
> A shared table is only route the query to correct table
>>
>
> What is a "shared table"? You want to "correct the table", or query "the 
> correct table"? When do you know the table, and when don't you know it and 
> why don't you know it?
>  
>
>> ,do not store any data.
>>
>
> You are trying to solve access right problems? That doesn't sound right.
>  
>
>> Shared by primary key, or use some secondary index.
>>
>
>  Sorry I don't understand.
>
> Maybe the problem is that English is not my first language. Maybe you 
> write your query in your original language, and then we use Google 
> translate (to translate it to my first language)?
>
> Regards,
> Thomas
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to