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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
oscarfh's avatar
69
oscarfh
asked 12 years ago
Evgeny's avatar
13.2k
Evgeny
updated 12 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago
link

Comments

1

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 (12 years ago)

it's called: django_session

Fitoria's avatar Fitoria (12 years ago)

Thanks! I will try the cleanup command :)

oscarfh's avatar oscarfh (12 years ago)

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 (12 years ago)
see more comments