For best performance, it is better to use ArticleArchive.objects.bulk_create(...):
articles = list()
for article in Article.objects.filter(date__year=2011).values():
articles.append(ArticleArchive(**article))
if (len(articles) > 0):
ArticleArchive.objects.bulk_create(articles)
And then, if you want to remove articles from the source table (optional):
Article.objects.filter(date__year=2011).delete()
source
share