query and join op after sharding

Abioy Sun abioy.sun at gmail.com
Mon Nov 15 13:51:36 MSK 2010


hi, all

I'm handling something about sharding (or partition) recently. What I want
to do is to add more machines or nodes to my system so that storing more
data is possibale (maybe scale-out?).

I found many people add a middle layer between their applications and
databases, mysql for example. That seems to be perfect for me at first
glance. But then I'm puzzled about the query and join operation.

Q1:
How to handle queries with offset and limit like:

'select * from xxxx where yyyy order by col_a asc limit num_b, num_c'

Just perform the query 'select * from xxxx where yyyy order by col_a asc
limit 0, num_b + num_c' on each machine, merge the results and return
[num_b, num_b + num_c)?

Q2:
How to handle the join operations within different databases?

Sorry for posting sth about database here in nginx forum, I really really
need your help and will be very appreciative for that, thx!

Abioy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20101115/81ff520e/attachment-0001.html>


More information about the nginx mailing list