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

Category: Redshift

How-To Guides / Redshift

How to change owner of a Procedure in Redshift database

You have to be a super user to be able change the owner of a procedure. Below is the syntax

Continue reading
How-To Guides / Redshift

How to Rename a Procedure in Redshift database

Below is the sql command to rename a stored procedure where proc_name is the name of the procedure and datatype1,

Continue reading
How-To Guides / Redshift

How to find the size of a Redshift database

To determine the size of a database in Redshift cluster, use the below query. SELECT database, SUM(size) as “size in

Continue reading
How-To Guides / Redshift

How to find the size of a schema in Redshift

Use the below query to determine the size of all schemas in Redshift database. SELECT schema, SUM(size) as “size in

Continue reading
How-To Guides / Redshift

How to find the size of a table in Redshift

SVV_TABLE_INFO view shows information of all user-defined tables.Use the below query to determine the size of a table in Redshift

Continue reading
How-To Guides / Redshift

How to cancel a running query in Redshift

Run the below query to identify the query that needs to be cancelled and copy the ‘pid’. select pid, user_name,

Continue reading
How-To Guides / Redshift

How to drop a materialized view in Redshift database

Use the below command to drop a materialized view where mv_name is the name of the materialized view. DROP MATERIALIZED

Continue reading
How-To Guides / Redshift

How to copy data from a file in S3 bucket to Redshift tables

Copy using iam role: copy schemaname.tablename from ‘s3://bucketname/filename’ iam_role ‘arn of iam role’ DELIMITER ‘|’ ESCAPE; Copy using credentials: copy

Continue reading
How-To Guides / Redshift

How to insert data into Redshift tables.

Below is the syntax to insert a row into redshift table using sql statement. The list of values should be

Continue reading
How-To Guides / Redshift

How to vacuum a table in Redshift database

Run the below command to perform full vacuum of a table to 95%.

Continue reading

Posts pagination

«Previous Posts 1 … 7 8 9 10 11 Next Posts»
  • PostgreSQL Tutorials
  • Redshift Tutorials
WordPress Theme: Maxwell by ThemeZee.