In Django 1.1 onwards, you can use defer('col1', 'col2')
to exclude columns from the query, or only('col1', 'col2')
to only get a specific set of columns. See the documentation.
values
does something slightly different - it only gets the columns you specify, but it returns a list of dictionaries rather than a set of model instances.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…