How to Use Snowflake Instead of Redshift in PostgreSQL

Galaxy Glossary

Why should I use Snowflake instead of Redshift?

Shows when and how to pick Snowflake over Amazon Redshift for analytics workloads.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Description

Table of Contents

Why choose Snowflake over Redshift?

Snowflake separates storage and compute, so you can scale query power up or down in seconds without copying data. Redshift clusters tie storage to nodes, forcing over-provisioning or painful resizing.

How does Snowflake’s architecture boost concurrency?

Each Snowflake virtual warehouse works in isolation. Ten teams can run heavy reports simultaneously without blocking one another. Redshift uses shared cluster resources, so one runaway query can throttle others.

What cost advantages does Snowflake provide?

You only pay for compute while the warehouse runs. Suspend it during idle hours and storage stays cheap. Redshift charges per hour for the whole cluster, even when no queries run.

How does automatic tuning differ?

Snowflake handles vacuuming, statistics, and compression for you. Redshift administrators must set sort keys, dist keys, and run VACUUM or ANALYZE regularly.

When should I still pick Redshift?

Choose Redshift when you already rely on AWS ecosystem tools, need predictable 24/7 workloads, and have admins to tune clusters.

How do I migrate an ecommerce dataset?

Export each table to Amazon S3, then use Snowflake’s external stage and COPY INTO to ingest the files.

Step 1 – Export data from Redshift

COPY Customers TO 's3://shop-backups/customers/'
IAM_ROLE 'arn:aws:iam::123:role/redshiftS3'
FORMAT AS PARQUET;

Step 2 – Create a stage in Snowflake

CREATE STAGE shop_stage
URL='s3://shop-backups/'
CREDENTIALS=(AWS_KEY_ID='…' AWS_SECRET_KEY='…');

Step 3 – Load into Snowflake tables

COPY INTO Customers
FROM '@shop_stage/customers/'
FILE_FORMAT=(TYPE=PARQUET);

Best practices for Snowflake adoption

Size warehouses small, auto-suspend after 5 minutes, use ROLE-based security, and tag usage for chargeback.

Common mistakes to avoid

Ignoring warehouse auto-suspend: Leaving warehouses running burns credits. Set AUTO_SUSPEND = 300.

Copying Redshift dist/sort keys: Snowflake clusters data automatically. Remove those keys during migration.

Why How to Use Snowflake Instead of Redshift in PostgreSQL is important

How to Use Snowflake Instead of Redshift in PostgreSQL Example Usage


--Find customers whose lifetime spend doubled after moving to Snowflake
WITH rs_totals AS (
  SELECT customer_id, SUM(total_amount) AS redshift_total
  FROM redshift.public.Orders
  GROUP BY customer_id
),
  sf_totals AS (
  SELECT customer_id, SUM(total_amount) AS snowflake_total
  FROM Orders
  GROUP BY customer_id
)
SELECT c.name, rs.redshift_total, sf.snowflake_total
FROM Customers c
JOIN rs_totals rs ON rs.customer_id = c.id
JOIN sf_totals sf ON sf.customer_id = c.id
WHERE sf.snowflake_total > 2 * rs.redshift_total;

How to Use Snowflake Instead of Redshift in PostgreSQL Syntax


--Create virtual warehouse (compute)
CREATE WAREHOUSE reporting_wh
  WAREHOUSE_SIZE = 'SMALL'
  AUTO_SUSPEND = 300  --seconds
  AUTO_RESUME = TRUE;

--Stage file load example using ecommerce tables
CREATE STAGE shop_stage
  URL='s3://shop-backups/'
  CREDENTIALS=(AWS_KEY_ID='…' AWS_SECRET_KEY='…');

COPY INTO Orders
FROM '@shop_stage/orders/'
FILE_FORMAT=(TYPE=PARQUET);

--Query joining Snowflake tables in an ecommerce model
SELECT c.name,
       o.order_date,
       SUM(oi.quantity * p.price) AS order_total
FROM Customers c
JOIN Orders o   ON o.customer_id = c.id
JOIN OrderItems oi ON oi.order_id = o.id
JOIN Products p ON p.id = oi.product_id
GROUP BY 1,2
ORDER BY 2 DESC;

Common Mistakes

Frequently Asked Questions (FAQs)

Does Snowflake store data in my AWS account?

No. Snowflake manages storage inside its own AWS (or Azure/GCP) account and bills you for compressed storage.

Can I query S3 data without loading it?

Yes. Use Snowflake external tables to run SQL on Parquet or CSV files in S3 without ingesting them.

How long does a typical Redshift migration take?

A small ecommerce database (≤1 TB) can migrate in a weekend using S3 exports and Snowflake COPY.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.