On Wednesday, October 11, 2017 at 3:33:23 AM UTC-7, Nicolas MARTIN wrote:
>
> There was no surprise regarding the number of sessions removed (almost 
> zero),  the site has been released publicly a few months ago.
> My command was just for testing purpose but I didn't expect it would take 
> some much time with no substantial operations on the db.
>
> In fact, we have a mean of 500 sessions created per day since putting it 
> online. I decided to cut by half and kept the sessions only since 
> September, 
> I'm not sure if we have an interest of keeping them.
>
> The weird thing is that the command took about 4 mins while parsing the 
> same number of sessions.
>
>
> Nicolas
>

You could see what queries are being executed by setting:

[logging]
log_level = DEBUG

[trac]
debug_sql  = enabled

You should get just two queries:

11:23:58 Trac[util] DEBUG: SQL:
                DELETE FROM session
                WHERE authenticated=0 AND last_visit<%s

11:23:58 Trac[util] DEBUG: args: (1444674238,)
11:23:58 Trac[util] DEBUG: prefetch: 0 rows
11:23:58 Trac[util] DEBUG: SQL:
                DELETE FROM session_attribute
                WHERE authenticated=0
                      AND sid NOT IN (SELECT sid FROM session
                                      WHERE authenticated=0)

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to