Redshift STL/STV/SVV

STL tables are generated from logs that have been persisted to disk to provide a history of the system. STV tables are virtual tables that contain snapshots of the current system data. They are based on transient in-memory data and are not persisted to disk-based logs or regular tables. System views that contain any reference to a transient STV table are called SVV views. Views containing only references to STL tables are called SVL views.

To manage disk space, the STL log tables only retain approximately two to five days of log history, depending on log usage and available disk space.

To check the record of wlm aborted queries:

select * from stl_wlm_rule_action

Amazon Redshift locks tables to prevent two users from updating the same table at the same time.

To Check locks record:

select table_id, last_update, lock_owner, lock_owner_pid from stv_locks;


Find and Cancel long running query in Redshift?

select pid, trim(user_name), starttime, substring(query,1,20)
from stv_recents
where status=’Running’;

Take the pid from result

cancel pid;
for example: cancel 11516;

2 thoughts on “Redshift STL/STV/SVV

  • April 4, 2019 at 5:56 pm

    I’m not sure exactly why but this site is loading incredibly slow for me. Is anyone else having this problem or is it a issue on my end? I’ll check back later and see if the problem still exists.

  • May 4, 2019 at 3:51 pm


    I’ve been visiting your website a few times and decided to give you some positive feedback because I find it very useful. Well done.

    I was wondering if you as someone with experience of creating a useful website could help me out with my new site by giving some feedback about what I could improve?

    You can find my site by searching for “casino gorilla” in Google (it’s the gorilla themed online casino comparison).

    I would appreciate if you could check it out quickly and tell me what you think.

    Thank you for help and I wish you a great week!


Leave a Reply

Your email address will not be published. Required fields are marked *