Django QuerySet vs Raw Query performance
问题 I have noticed a huge timing difference between using django connection.cursor vs using the model interface, even with small querysets. I have made the model interface as efficient as possible, with values_list so no objects are constructed and such. Below are the two functions tested, don't mind the spanish names. def t3(): q = "select id, numerosDisponibles FROM samibackend_eventoagendado LIMIT 1000" with connection.cursor() as c: c.execute(q) return list(c) def t4(): return list