Skip to content

AWS bytes

  • Cheat Sheets
  • Concepts
    • Show All
    • S3 Concepts
  • How-To Guides
    • Show all
    • EC2
    • EBS
    • S3
    • Redshift
    • IAM
    • SQS
    • CloudWatch
    • Billing
  • CLI Guides
  • Contact Us
  • Tutorials
  • Interview Questions
  • Postgresql
How-To Guides / Redshift

How to list Materialized views, enable auto refresh, check if stale in Redshift database

Run the below query to lit all the materialized views in a schema in Redshift database. select name from STV_MV_INFO

Continue reading
How-To Guides / Redshift

How to list all tables and views in Redshift

Run the below query to return all tables and views of a schema in Redshift database where schemaname is the

Continue reading
How-To Guides / Redshift

How to get the name of the database in Redshift

Run the below query to return the name of the database you are currently connected to. select current_database();

Continue reading
How-To Guides / Redshift

How to view all active sessions in Redshift database

Use the below query to view all active sessions in Redshift database. select distinct starttime , process , user_name ,

Continue reading
How-To Guides / Redshift

How to determine the version of Redshift database

Run the below query to determine the version of Redshift as well as the operating system of the underlying host.

Continue reading
How-To Guides / Redshift

How to list all the databases in a Redshift cluster

Run the below query to list all the databases in a Redshift cluster. select oid as db_id, datname as db_name,

Continue reading
How-To Guides / Redshift

How to get the column names of a table in Redshift

You can list all the columns of a table using below query where tablename is the name of the table.

Continue reading
How-To Guides / Redshift

How to get all the currently running queries in Redshift

Use the below query to identify all the queries currently in process. select userid , query , pid , starttime

Continue reading
How-To Guides / Redshift

How to get the column count of all tables in Redshift

Run the below query to get the column count of all tables in Redshift database. select table_schema, table_name, count(*) from

Continue reading
How-To Guides / Redshift

How to get the row count of all tables in Redshift

Run the below query to obtain the row count of all tables in Redshift database select t1.table_schema, t1.table_name, t2.tbl_rows from

Continue reading

Posts pagination

«Previous Posts 1 … 13 14 15 16 17 … 33 Next Posts»
  • PostgreSQL Tutorials
  • Redshift Tutorials
WordPress Theme: Maxwell by ThemeZee.