一些解决方案

文件异步下载方案
1 set QueryBussessType manually different type --> different resolving code、wherecondition
2. frontend request with the type
3. get excelHeader --> groovyUtil load from db
4. getData from db with pagination
5. saveData in an excel
6.saveExcel temptly in hard disk in case of oom
6. while loop until allDatas are saved
7. compress all excel files
9 upload files to server and return the url

按照非分片键查询的方案

toc Business when we query data with nonshardingkey , we can combine shardingkey to other protential query clause column, but thes columns should be related to the shardingkey , for example useId AND orderId or phoneNumber
if the clause is some totally unrelated columns such as creatTime or someThing like that, then there is no way ,because related data could be in every partition, we must change our business logic

  1. simplestly,we can use string form : “orderkey-shardingkey”,
  2. use some bit operation
    一些解决方案_第1张图片
    reference
    https://www.163.com/dy/article/HO5MEI7O05316FM3.html

你可能感兴趣的:(java)