Imagine 2 lines:
Model.objects.all().delete()
and
Model.objects.delete()
Is there any difference in the execution flow? DB server is Mysql (Amazon RDBMS).
Will the first line firstly load all the objects, and delete them one by one? Or 'truncate' command will be executed?
And, most important - what if the first line will be interrupted during its execution for some reasons? For example, we have a big table with lots of records. If we execute the first line and the script will be killed - does it mean that some records will be deleted, and some - not?
Thank you!