📜  django orm 中的 values_list 是什么 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:39.106000             🧑  作者: Mango

代码示例1
Test.objects.all()                                  time: 0.010061947107315063
 Test.objects.all().values('first')                  time: 0.00578328013420105
 Test.objects.all().values_list('first')             time: 0.005257354974746704
 Test.objects.all().values_list('first', flat=True)  time: 0.0052023959159851075
 Test.objects.all().only('first')                    time: 0.011166254281997681