Welcome Guest Login Register Member List
ExpressionEngine Forums
Advanced Search
Username: Password:
Remember Me? forgot password?
You are here: Forum Home  >  Usage  >  Troubleshooting  >  Thread
   
 
‘sessions’ table should be reduced
 
traq
Posted: 19 August 2008 02:07 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  5
Joined  2008-06-30

Hi,
my “sessions” table got 10708 lines,
and the sqlite database is getting very big (24M) for just ~50 tasks.
How can I easily reduce the size of the sessions table ?

Profile
 
Reinier Balt
Posted: 19 August 2008 02:53 PM   [ Ignore ]   [ # 1 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

just run

{{{
rake db:sessions:clear
}}}

this task will clean the sessions from your database.

Profile
 
Reinier Balt
Posted: 19 August 2008 02:53 PM   [ Ignore ]   [ # 2 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

ignore the {{{ and }}}

Profile
 
traq
Posted: 20 August 2008 08:22 AM   [ Ignore ]   [ # 3 ]  
Newbie
Rank
Total Posts:  5
Joined  2008-06-30

Thanks !

RAILS_ENV=production rake db:sessions:clear

I managed, using it, to empty the sessions table, thank you !
But the database still got the exact same size… very strange !

Profile
 
Reinier Balt
Posted: 20 August 2008 11:40 AM   [ Ignore ]   [ # 4 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

I’m not sqlite expert, but perhaps there is some sort of ‘compact’ tool for sqlite databases? I see a VACUUM command, but I’m not sure if that will do the trick. http://www.sqlite.org/lang_vacuum.html

Profile
 
traq
Posted: 20 August 2008 12:54 PM   [ Ignore ]   [ # 5 ]  
Newbie
Rank
Total Posts:  5
Joined  2008-06-30

Great, thanks !

I did :

# sqlite3 db/tracks-15-blank.db

VACUUM;

.exit

And the database went from 24M to 65K !

Profile
 
Reinier Balt
Posted: 20 August 2008 01:04 PM   [ Ignore ]   [ # 6 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

great! Now to put a recurring todo in your tracks to remind you to do this once in a while grin

Profile
 
   
 
 
‹‹ Alt-N Accesskey not working on any page.      Sync phone contex with mobile phone? ››

Powered By ExpressionEngine
Template Design By Sonnenvogel.com
Select a theme:

ExpressionEngine Discussion Forum - Version 2.1.2 (20091002)
Script Executed in 0.1118 seconds

Atom Feed
RSS 2.0