I would like to see the size of the database I created with django. This is for a project. How do I go about that? I have looked at stackoverflow answers, and I found this answer:
$ python manage.py shell
>>> import sys
>>> from myapp.models import MyModel
>>> my_model = MyModel()
>>> total_size = sys.getsizeof(my_model) * MyModel.objects.count()
This however always gives a size of 24 bytes, while the tables I put into it have completely different amounts of fields. I suspect this is wrong.
Thanks in advance.