摘要:
昨日内容回顾 批量插入数据 # 本质就是一次插入多条数据,执行一次SQL语句 # mysql连接池 ORM: l = [] for i in range(10000): res = models.Book('') l.append(res) models.Book.objects.bulk_crea 阅读全文
摘要:
上期内容回顾 聚合查询和分组查询 # 聚合查询 max min sum avg count # 查询关键字:aggregate from django.db.models import Max, Min, Sum, Avg, Count res = Book.objects.aggregate(ma 阅读全文