Dhruv
08/17/2026, 5:56 PMRocky
08/17/2026, 5:56 PMORDER BY expression. This acts as a primary index for data skipping.
* Bitmap Indexes: You can create bitmap indexes on columns in the MV to accelerate filtering on low-cardinality data.
* Bloom Filter Indexes: You can enable Bloom Filters on the MV to speed up equality predicates (e.g., WHERE id = 123).
Example of creating an MV with an index on Iceberg data:
sql
CREATE MATERIALIZED VIEW my_iceberg_mv
DISTRIBUTED BY HASH(user_id)
ORDER BY (event_time) -- Defines the sort key/index
REFRESH ASYNC EVERY (INTERVAL 1 HOUR)
AS
SELECT user_id, event_time, action
FROM iceberg_catalog.db.logs;
-- Add a bitmap index to the MV
CREATE INDEX idx_action ON my_iceberg_mv(action) USING BITMAP;
Summary: AMV vs. Others
* AMV (Asynchronous Materialized View): Best for Data Lake acceleration. Supports multi-table joins, complex SQL, and indexes. It stores data natively.
* Synchronous MV: Mostly used for simple rollups (aggregations) on a single internal table. It is less flexible for Iceberg.
* Data Cache: StarRocks also has a "Data Cache" feature that automatically caches Iceberg data blocks on local BE disks. This is "zero-effort" acceleration, but MVs are even faster for complex queries because they store pre-computed results, not just raw blocks.
Recommendation: Use AMVs if you need sub-second response times on Iceberg data or want to add indexes for specific query acceleration.
References
• using_starrocks/async_mv/Materialized_view.md
• table_design/table_design.mdDhruv
08/17/2026, 5:59 PMRocky
08/17/2026, 5:59 PMVIEW (because a view has no data of its own), but you can add them to an Asynchronous Materialized View (AMV) because it is a physical table.
Since Iceberg doesn't support traditional database indexes, AMVs are the perfect way to add them:
* Sort Keys (Primary Index): When creating the AMV, use ORDER BY. This stores the data physically sorted, allowing StarRocks to "skip" massive amounts of data during range filters.
* Bitmap Indexes: Excellent for speeding up filters on columns with low-to-medium variety (e.g., city, category, status).
* Bloom Filter Indexes: Excellent for high-cardinality columns (e.g., user_id, order_uuid) to quickly check if a value exists in a data block.
Example:
sql
-- Create AMV with a Sort Key (Index)
CREATE MATERIALIZED VIEW iceberg_accelerated_mv
DISTRIBUTED BY HASH(user_id)
ORDER BY (event_date, user_id) -- This is your "index" for data skipping
REFRESH ASYNC EVERY (INTERVAL 1 HOUR)
PROPERTIES (
"bloom_filter_columns" = "user_id" -- Adds a Bloom Filter index
)
AS
SELECT user_id, event_date, region, revenue
FROM iceberg_catalog.db.raw_data;
-- Add a Bitmap index after creation
CREATE INDEX idx_region ON iceberg_accelerated_mv(region) USING BITMAP;
Recommendation: AMV is the right choice
For your scenario, AMVs are the superior choice.
* Standard Views: No performance gain; no indexes.
* Data Cache: Speeds up raw Iceberg reads, but doesn't allow for pre-aggregation or custom indexing.
* AMVs: Provide pre-aggregation, native StarRocks performance, and the ability to add Sort Keys, Bitmap, and Bloom Filter indexes to data that originally came from Iceberg.
References
• sql-reference/sql-statements/materialized_view/CREATE_MATERIALIZED_VIEW.md
• deployment/shared_data/s3.md
• using_starrocks/async_mv/Materialized_view.md
• table_design/indexes/Bitmap_index.md
References
• sql-reference/sql-statements/materialized_view/CREATE_MATERIALIZED_VIEW.md
• using_starrocks/async_mv/Materialized_view.mdDhruv
08/17/2026, 6:02 PMRocky
08/17/2026, 6:03 PMdefault_catalog, not in your iceberg_catalog.
* How it works: Your base data remains in the iceberg_catalog (remote S3 Bucket A). However, because an AMV is a physical StarRocks table that requires local metadata and internal storage (S3 Bucket B), it must reside within StarRocks' internal storage system.
* Accessing it: You typically create a database in the default_catalog (e.g., create database mv_db) and create the AMV there. You can then query it directly or let the optimizer pick it when you query the Iceberg catalog.
──────────
2. How the Refresh (Sync) Works
StarRocks offers flexible refresh strategies so you can control how "busy" the cluster gets:
Does it sync when someone queries it?
No. Querying the view does not trigger a data sync.
* If you query the base Iceberg table: StarRocks checks if the MV is "fresh." If the Iceberg data has changed since the last MV refresh, StarRocks will ignore the MV and query the raw Iceberg data directly to ensure accuracy (unless you explicitly allow "stale" data using mv_rewrite_staleness_second).
* If you query the MV directly: You will get the data from the last successful refresh, regardless of how much the Iceberg source has changed.
Handling "Constant Updates" in Iceberg
If your Iceberg tables are updated constantly, you should avoid the default REFRESH ASYNC strategy, as it may trigger too many refresh tasks. Instead, use one of these two options to keep StarRocks from being overloaded:
1. Scheduled Refresh (Recommended for your case):
Set a fixed interval (e.g., every 30 minutes or 1 hour). StarRocks will only look for changes and sync at those specific times.
sql
CREATE MATERIALIZED VIEW my_mv
REFRESH ASYNC EVERY (INTERVAL 1 HOUR) -- Syncs only once an hour
AS SELECT ... FROM iceberg_catalog.db.table;
2. Manual Refresh:
StarRocks does nothing automatically. You trigger the sync via your own pipeline (like Airflow, dbt, or a cron job) after your Iceberg ETL is finished.
sql
-- Triggered manually by your pipeline
REFRESH MATERIALIZED VIEW my_mv;
Partition-Level Refresh (The Efficiency Key)
Starting from StarRocks v3.1.4, StarRocks can detect which specific partitions in Iceberg have changed. If you partition your AMV the same way as your Iceberg table, StarRocks will only refresh the changed partitions instead of re-reading the entire dataset. This drastically reduces the workload on StarRocks during a sync.
Example of a partitioned AMV:
sql
CREATE MATERIALIZED VIEW ice_mv
PARTITION BY event_date -- Matches Iceberg partitioning
REFRESH ASYNC EVERY (INTERVAL 1 HOUR)
AS SELECT * FROM iceberg_catalog.db.large_table;
Summary Recommendation
To prevent StarRocks from being "constantly busy" while still getting the benefit of indexes:
1. Create the AMV in the default_catalog.
2. Use REFRESH ASYNC EVERY (INTERVAL ...) to control the frequency.
3. Use PARTITION BY to ensure StarRocks only updates new/changed data, rather than the whole table.
whole table.
whole table.
References
• using_starrocks/async_mv/Materialized_view.md
• using_starrocks/async_mv/use_cases/data_lake_query_acceleration_with_materialized_views.md
• sql-reference/sql-statements/materialized_view/CREATE_MATERIALIZED_VIEW.md
• sql-reference/sql-statements/materialized_view/REFRESH_MATERIALIZED_VIEW.md
ReferencesDhruv
08/18/2026, 6:59 AMRocky
08/18/2026, 7:00 AMCREATE OR REPLACE VIEW command in StarRocks using the same name. StarRocks will add its own dialect to that same Iceberg view object without breaking it for other engines.
3. How to verify and "see" them
If you are on a supported version but still don't see them:
1. Grant Permissions: Ensure your user has USAGE and SELECT permissions on the catalog.
sql
GRANT USAGE ON CATALOG iceberg_catalog TO ROLE public;
2. Check Object Type: In StarRocks, run SHOW TABLES FROM <catalog>.<db>;. StarRocks typically lists both tables and views in this output. If it's missing, it’s likely a version or dialect incompatibility.
3. Manual Creation: If the view isn't showing up, you can simply "re-create" it from within StarRocks pointing to the same base Iceberg tables. This creates a StarRocks-native view object that will then be visible and queryable.
Summary
If you want the best performance and indexing (as discussed in the previous messages), you should still use Asynchronous Materialized Views (AMVs) in your default_catalog.
Standard Iceberg views (logical views) are only for "getting away with it" for simple queries and do not support indexes. If you need the performance of indexes and native storage, AMVs are the way to go, even if you already have logical views in Iceberg.
References
• data_source/feature-support-data-lake-analytics.md
• data_source/catalog/iceberg/DDL.md
• data_source/catalog/iceberg/iceberg_catalog.md
References
• data_source/catalog/iceberg/DDL.md
• data_source/feature-support-data-lake-analytics.md
• sql-reference/sql-statements/View/CREATE_VIEW.md
• data_source/catalog/iceberg/iceberg_catalog.mdDhruv
08/18/2026, 7:10 AMRocky
08/18/2026, 7:11 AMThis catalog doesn't support creating/alter views.
How to resolve this:
1. Create the view in the default_catalog (Recommended)
Instead of creating the view inside your iceberg_catalog, create it in the StarRocks internal catalog. This view will still query your Iceberg data, but its definition will be stored in StarRocks.
sql
-- Switch to a database in your local StarRocks catalog
USE default_catalog.your_db;
-- Create the view pointing to the Iceberg table
CREATE VIEW my_iceberg_view AS
SELECT * FROM iceberg_catalog.iceberg_db.my_table;
2. Use an Asynchronous Materialized View (AMV)
As discussed earlier, if your goal is to add indexes (Sort Keys, Bitmap, etc.), a standard logical view won't work anyway. You must use an AMV. Like logical views, AMVs must also reside in the default_catalog.
sql
CREATE MATERIALIZED VIEW default_catalog.your_db.accelerated_iceberg_mv
DISTRIBUTED BY HASH(id)
REFRESH ASYNC EVERY (INTERVAL 1 HOUR)
AS
SELECT * FROM iceberg_catalog.iceberg_db.my_table;
Why don't you see Iceberg views automatically?
If you created views using Spark or Trino in your Iceberg catalog:
* Version Compatibility: StarRocks only started supporting the discovery/querying of existing Iceberg views in recent versions (v3.3.2+ for REST, v3.4.1+ for Glue/HMS).
* Dialect Issues: Iceberg views store specific SQL dialects. If a view was created by Spark, it may not have a "StarRocks" dialect version. In StarRocks v3.5+, you can "attach" a StarRocks definition to an existing Iceberg view using CREATE OR REPLACE VIEW if the catalog supports it (currently primarily REST catalogs).
Summary for v4.1.4
* Iceberg REST Catalog: Supports CREATE VIEW (writes to the remote catalog).
* Iceberg Glue/HMS Catalog: Does not support CREATE VIEW (returns the error you saw).
* Workaround: Always create your views or AMVs in the default_catalog.
References
• data_source/catalog/iceberg/DDL.md
• sql-reference/sql-statements/View/CREATE_VIEW.md
• data_source/catalog/iceberg/iceberg_catalog.md
• using_starrocks/async_mv/Materialized_view.mdDhruv
08/18/2026, 7:12 AMRocky
08/18/2026, 7:12 AMVIRTUAL_VIEW. Other engines (like StarRocks) cannot easily "see" or parse this because it’s a specific Glue/Athena object, not an Iceberg object.
* Iceberg Views: These follow the official Apache Iceberg View Specification. They are stored as metadata files on S3, similar to how Iceberg tables work. StarRocks (v3.3+) only looks for these native Iceberg View objects.
2. Why StarRocks doesn't see them automatically
StarRocks' Iceberg Catalog is designed to discover Iceberg-formatted objects.
* If the view was created by Athena's standard CREATE VIEW command, it is not an Iceberg-formatted view. It is an "Athena view."
* StarRocks currently does not support importing standard Athena logical views via the Iceberg catalog.
3. How to fix this in StarRocks v4.x
Since you are on a modern version (v4.x), you have two paths:
Option A: Re-create the view in StarRocks (Logical Only)
If you just want the view to be visible and queryable in StarRocks, create it in your default_catalog. It will point to the Iceberg tables but the definition will live in StarRocks.
sql
CREATE VIEW default_catalog.your_db.my_view AS
SELECT * FROM iceberg_catalog.iceberg_db.table;
Option B: Create a Native Iceberg View (Experimental)
If you are using a REST Catalog (like Polaris or Gravitino), StarRocks v3.5+ can create views that follow the Iceberg Spec. However, if you are using Glue, StarRocks (and Athena) support for the native Iceberg View Spec is still evolving.
* Note: Athena only recently added support for native Iceberg views. If you didn't specifically create an "Iceberg View" in Athena (which requires specific settings), StarRocks won't see it.
Summary Recommendation
Do not rely on Athena to create views for StarRocks. Because StarRocks is a high-performance engine, the best practice is:
1. For simple logic: Create the view in the StarRocks default_catalog.
2. For performance (Indexes): Create an Asynchronous Materialized View (AMV) in the default_catalog. This will give you the "Data Warehouse" speed you likely want from StarRocks while keeping your data in Iceberg.
References
• data_source/catalog/iceberg/iceberg_catalog.md
• data_source/feature-support-data-lake-analytics.md
• sql-reference/sql-statements/View/CREATE_VIEW.md
References
• data_source/catalog/iceberg/iceberg_catalog.md
• data_source/feature-support-data-lake-analytics.md
• data_source/catalog/iceberg/DDL.md
• quick_start/iceberg.md