Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我真的很想知道使用查询之间的性能差异,例如:
query = MyModel.objects.filter(pk=1)
和
query = MyModel.objects.raw("SELECT * FROM my_models WHERE model_id = 1 ")
另外,您能否详细说明为什么会有这样的性能差异?
非常感谢,萨凯特