USER_SESSIONS data retention period?

Moderator: NorbertKrupa

Post Reply
User avatar
heather
Newbie
Newbie
Posts: 22
Joined: Fri Dec 28, 2012 3:01 pm

USER_SESSIONS data retention period?

Post by heather » Wed Apr 16, 2014 5:10 pm

What is the retention period for the data in the user_sessions table? It doesn't seem very long, like 2 days maybe... :cry:

Code: Select all

vertica=> select sysdate, min(session_start_timestamp) from user_sessions;
          sysdate           |              min              
----------------------------+-------------------------------
 2014-04-16 09:09:45.784007 | 2014-04-14 11:20:30.003191-07
(1 row)
Can I make it longer?

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: USER_SESSIONS data retention period?

Post by id10t » Wed Apr 16, 2014 5:33 pm

Hi!

[DELETED]
Last edited by id10t on Wed May 06, 2015 5:37 pm, edited 2 times in total.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: USER_SESSIONS data retention period?

Post by NorbertKrupa » Wed Apr 16, 2014 5:46 pm

It's based on memory and disk space set for the policy. The documentation shows how to query and change the retention policy.

Code: Select all

dbadmin=> SELECT GET_DATA_COLLECTOR_POLICY('SessionStarts');
                         GET_DATA_COLLECTOR_POLICY
---------------------------------------------------------------------------
 200KB kept in memory, 5000KB kept on disk. Time based retention disabled.
(1 row)

dbadmin=> SELECT GET_DATA_COLLECTOR_POLICY('SessionEnds');
                         GET_DATA_COLLECTOR_POLICY
---------------------------------------------------------------------------
 100KB kept in memory, 5000KB kept on disk. Time based retention disabled.
(1 row)
You can get a list of all the data collection components using:

Code: Select all

SELECT DISTINCT component, description FROM v_monitor.data_collector ORDER BY component;
I discussed Data Collector Tables and retention defaults in this post.
Checkout vertica.tips for more Vertica resources.

Post Reply

Return to “New to Vertica Database Administration”