First time here? Check out the FAQ!
1

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

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

oscarfh's avatar
69
oscarfh
asked 2013-03-05 09:39:10 -0600
Evgeny's avatar
13.2k
Evgeny
updated 2013-03-05 14:31:30 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

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.

Evgeny's avatar
13.2k
Evgeny
answered 2013-03-05 10:02:56 -0600
edit flag offensive 0 remove flag delete link

Comments

1
Fitoria's avatar Fitoria (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's avatar oscarfh (2013-03-05 10:40:50 -0600) edit

it's called: django_session

Fitoria's avatar Fitoria (2013-03-05 10:43:43 -0600) edit

Thanks! I will try the cleanup command :)

oscarfh's avatar oscarfh (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's avatar Evgeny (2013-03-05 11:19:06 -0600) edit
add a comment see more comments