MybatisPlus优化查询

long timeMillisStart = System.currentTimeMillis();
Page<CloudBillDetail> billDetailVOPage=new Page<>();
billDetailVOPage.setSize(100);
billDetailVOPage.setPages(1);
List<CloudBillDetail> cloudBillDetails = lambdaQuery().eq(CloudBillDetail::getDeleteFlag, 0).orderByAsc(CloudBillDetail::getId).select(CloudBillDetail::getInnerInstanceId).page(billDetailVOPage).getRecords();
long timeMillis = System.currentTimeMillis();
long functionTimess = timeMillis - timeMillisStart;
System.out.println("查询耗时"+functionTimess);
posted @ 2024-11-25 09:54  笃灬  阅读(2)  评论(0编辑  收藏  举报