Ask Your Question

big sqlite database

asked 2013-06-11 11:31:43 -0500

zulp gravatar image

i have only 300 Question and 60 registred users. how can that my Sqlite databse is so huge (500MB) is there any way to cleanup the database . or to move it to Mysql ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-06-12 10:49:02 -0500

one way to do it (not 100% reliable) is to do the following:

With sqlite as a database:

python dumpdata > mydata.json

Change to postgres in, run sycdb and migrate commands and then:

python loaddata < mydata.json
edit flag offensive delete link more

answered 2013-06-11 14:53:26 -0500

Evgeny gravatar image

Move to PostgresQL - the best option for the production hosting of all available.

edit flag offensive delete link more


Trying to convert my sqlite database postgresql

[root@Centos DEV]# python shell --database=sqlite
/usr/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/ DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
Usage: shell [options]

Runs a Python interactive interpreter. Tries to use IPython, if it's available. error: no such option: --database

How to solve that ?

zulp gravatar imagezulp ( 2013-06-12 10:44:47 -0500 )edit

Use django's dumpdata and loaddata commands.

Evgeny gravatar imageEvgeny ( 2013-06-12 10:50:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-06-11 11:31:43 -0500

Seen: 582 times

Last updated: Jun 12 '13