Ask Your Question
1

Is there temp information I could delete from the database periodically?

asked 2013-03-05 09:39:10 -0600

oscarfh gravatar image

updated 2013-03-05 14:31:30 -0600

Evgeny gravatar image

My database is reaching the 10.000 rows capacity for Heroku free database. That is kind of strange because I have only 10 users and 7 questions. Yesterday I had a massive number of visits, but only 1 new question.

I imagine that there are some logging rows or some kind of temporary information stored in the database to create this number of new rows. Is there something I could erase periodically to free space in the database?

Thanks, Oscar

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-03-05 10:02:56 -0600

Evgeny gravatar image

It is a sessions table, it may bring problems with the disk space. Even if you delete the records, the space will not be released to the system.

A half-a$$ solution may be to drop the table and create it again, a better solution is to move sessions off the datadase.

edit flag offensive delete link more

Comments

1
Fitoria gravatar imageFitoria ( 2013-03-05 10:40:21 -0600 )edit

Actually I am concerned with row numbers. I will check the number of rows and delete them periodically :) Could you please give me the name of this table?

oscarfh gravatar imageoscarfh ( 2013-03-05 10:40:50 -0600 )edit

it's called: django_session

Fitoria gravatar imageFitoria ( 2013-03-05 10:43:43 -0600 )edit

Thanks! I will try the cleanup command :)

oscarfh gravatar imageoscarfh ( 2013-03-05 11:07:15 -0600 )edit

Running cleanup may not reduce the on-disk size of the table though. But if you run that command regularly - it will prevent or slow growth of the table. So now you might need to drop it and then implement the regular cleanup.

Evgeny gravatar imageEvgeny ( 2013-03-05 11:19:06 -0600 )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

Stats

Asked: 2013-03-05 09:39:10 -0600

Seen: 81 times

Last updated: Mar 05 '13