📅  最后修改于: 2022-03-11 14:47:07.533000             🧑  作者: Mango
sum_a = sum([item.column for item in queryset]) # Definitely takes more memory.
sum_b = queryset.aggregate(Sum('column')).get('column__sum') # Takes about 20% more time.