<p>hi, all</p>
<p>I&#39;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?).</p>
<p>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&#39;m puzzled about the query and join operation.</p>
<p>Q1:<br>How to handle queries with offset and limit like:</p>
<p>&#39;select * from xxxx where yyyy order by col_a asc limit num_b, num_c&#39;</p>
<p>Just perform the query &#39;select * from xxxx where yyyy order by col_a asc limit 0, num_b + num_c&#39; on each machine, merge the results and return [num_b, num_b + num_c)?</p>
<p>Q2:<br>How to handle the join operations within different databases?</p>
<p>Sorry for posting sth about database here in nginx forum, I really really need your help and will be very appreciative for that, thx!</p>
<div> </div>
<div>Abioy</div>