New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何解决慢查询问题? #18
Comments
目前APIJSON没提供case功能,还没有比较好的方式在APIJSON自动化API里做。 APIJSON做了以下SQL查询优化: 2.查询缓存: {
"[]": {
"count": 5,
"Moment": {
"@order": "date-"
},
"User": {
"id@": "/Moment/userId"
}
}
} 相同id的User只会去数据库查一次,之后都是调缓存。 3.查询预判 |
@Hugh0529 "[]":{
"join": "&/User/id@,</Comment/momentId@",
"Moment":{},
"User":{
"name?":"t",
"id@": "/Moment/userId"
},
"Comment":{
"momentId@": "/Moment/id"
}
} 详情见 通用文档/3.2 功能符/数组关键词 中的 join,感谢支持^_^ |
新增应用层连表 APP JOIN,例如 "join":"@/User/id@",支持跨不同类型数据库,缓存粒度更细更容易命中 |
实际开发中可能会遇到慢查询,会需要 RD 优化 sql,如果使用 APIJSON 遇到类似 case,怎么定制化的优化 sql 呢?
The text was updated successfully, but these errors were encountered: