logo
  • Release Notes
    • v2.5
    • v2.4
    • v2.3
    • v2.2
    • v2.1
    • v2.0
    • v1.19
  • StarRocks
  • Introduction to StarRocks
    • What is StarRocks?
    • Architecture
    • Features
  • Quick Start
    • Deploy StarRocks
    • Create a table
    • Load and query data
  • Table Design
    • Understand StarRocks table design
    • Data models
    • Data distribution
      • Data distribution
      • Dynamic partitioning
    • Sort keys and prefix indexes
  • Data Loading
    • Concepts
      • Strict mode
    • Overview of data loading
    • Load data from a local file system or a streaming data source using HTTP PUT
    • Load data from HDFS or cloud storage
    • Continuously load data from Apache Kafka®
    • Bulk load using Apache Spark™
    • Load data using INSERT
    • Load data using Stream Load transaction interface
    • Synchronize data from MySQL in real time
    • Continuously load data from Apache Flink®
    • Change data through loading
    • Transform data at loading
  • Data Unloading
    • Export data using brokers
    • Read data from StarRocks using Spark connector
    • Read data from StarRocks using Flink connector
  • Query Data Sources
    • Catalog
      • Overview
      • Default catalog
      • Hive catalog
      • Iceberg catalog
      • Hudi catalog
      • Query external data
    • External tables
  • Query Acceleration
    • Gather CBO statistics
    • Materialized view
    • Colocate Join
    • Lateral Join
    • Index
      • Bitmap indexing
      • Bloom filter indexing
    • Computing the Number of Distinct Values
      • Use Bitmap for exact count distinct
      • Use HLL for approximate count distinct
  • Administration
    • Deployment
      • Deploy StarRocks with StarGo
      • Deploy StarRocks in Docker
      • Compile StarRocks
      • Deploy and manage CN on Kubernetes with StarRocks Operator
      • Deploy CN
      • Deploy Broker
      • Deploy FE cluster with high availability
    • Management
      • Scale in and out
      • Backup and restore
      • Configuration
      • Monitor and alert
      • Manage audit logs within StarRocks via Audit Loader
      • Manage a cluster
      • Enable FQDN access
      • Configure a time zone
      • Resource Management
        • Resource group
        • Query management
        • Memory management
        • Load balance
        • Replica
        • Blacklist
        • File manager
    • Data Recovery
      • Data recovery
      • Restore FEs
    • User Privilege and Authentication
      • User privilege
      • Authentication
    • Performance Tuning
      • Query planning
      • Analyze query profile
      • Profiling
  • Reference
    • SQL Reference
      • User Account Management
        • ALTER USER
        • CREATE ROLE
        • CREATE USER
        • DROP ROLE
        • DROP USER
        • EXECUTE AS
        • GRANT
        • REVOKE
        • SET PASSWORD
        • SET PROPERTY
        • SHOW AUTHENTICATION
        • SHOW GRANTS
        • SHOW ROLES
      • Cluster Management
        • ADD SQLBLACKLIST
        • ADMIN CANCEL REPAIR TABLE
        • ADMIN CHECK TABLET
        • ADMIN REPAIR TABLE
        • ADMIN SET CONFIG
        • ADMIN SET REPLICA STATUS
        • ADMIN SHOW CONFIG
        • ADMIN SHOW REPLICA DISTRIBUTION
        • ADMIN SHOW REPLICA STATUS
        • ALTER RESOURCE GROUP
        • ALTER SYSTEM
        • CANCEL DECOMMISSION
        • CREATE FILE
        • CREATE RESOURCE GROUP
        • DELETE SQLBLACKLIST
        • DROP FILE
        • DROP RESOURCE GROUP
        • EXPLAIN
        • INSTALL PLUGIN
        • KILL
        • SET
        • SHOW BACKENDS
        • SHOW BROKER
        • SHOW COMPUTE NODES
        • SHOW FILE
        • SHOW FRONTENDS
        • SHOW FULL COLUMNS
        • SHOW INDEX
        • SHOW PLUGINS
        • SHOW PROC
        • SHOW PROCESSLIST
        • SHOW RESOURCE GROUP
        • SHOW SQLBLACKLIST
        • SHOW TABLE STATUS
        • SHOW VARIABLES
        • UNINSTALL PLUGIN
      • DDL
        • ALTER DATABASE
        • ALTER MATERIALIZED VIEW
        • ALTER TABLE
        • ALTER VIEW
        • ALTER RESOURCE
        • ANALYZE TABLE
        • BACKUP
        • CANCEL ALTER TABLE
        • CANCEL BACKUP
        • CANCEL RESTORE
        • CREATE ANALYZE
        • CREATE EXTERNAL CATALOG
        • CREATE DATABASE
        • CREATE INDEX
        • CREATE MATERIALIZED VIEW
        • CREATE REPOSITORY
        • CREATE RESOURCE
        • CREATE TABLE AS SELECT
        • CREATE TABLE LIKE
        • CREATE TABLE
        • CREATE VIEW
        • CREATE FUNCTION
        • DROP ANALYZE
        • DROP STATS
        • DROP CATALOG
        • DROP DATABASE
        • DROP INDEX
        • DROP MATERIALIZED VIEW
        • DROP REPOSITORY
        • DROP RESOURCE
        • DROP TABLE
        • DROP VIEW
        • DROP FUNCTION
        • HLL
        • KILL ANALYZE
        • RECOVER
        • REFRESH EXTERNAL TABLE
        • RESTORE
        • SHOW ANALYZE JOB
        • SHOW ANALYZE STATUS
        • SHOW META
        • SHOW RESOURCES
        • SHOW FUNCTION
        • TRUNCATE TABLE
        • USE
      • DML
        • ALTER ROUTINE LOAD
        • BROKER LOAD
        • CANCEL LOAD
        • CANCEL EXPORT
        • CANCEL REFRESH MATERIALIZED VIEW
        • CREATE ROUTINE LOAD
        • DELETE
        • EXPORT
        • GROUP BY
        • INSERT
        • PAUSE ROUTINE LOAD
        • REFRESH MATERIALIZED VIEW
        • RESUME ROUTINE LOAD
        • SELECT
        • SHOW ALTER TABLE
        • SHOW ALTER MATERIALIZED VIEW
        • SHOW BACKUP
        • SHOW CATALOGS
        • SHOW CREATE MATERIALIZED VIEW
        • SHOW CREATE TABLE
        • SHOW CREATE VIEW
        • SHOW DATA
        • SHOW DATABASES
        • SHOW DELETE
        • SHOW DYNAMIC PARTITION TABLES
        • SHOW EXPORT
        • SHOW LOAD
        • SHOW MATERIALIZED VIEW
        • SHOW PARTITIONS
        • SHOW PROPERTY
        • SHOW REPOSITORIES
        • SHOW RESTORE
        • SHOW ROUTINE LOAD
        • SHOW ROUTINE LOAD TASK
        • SHOW SNAPSHOT
        • SHOW TABLES
        • SHOW TABLET
        • SHOW TRANSACTION
        • SPARK LOAD
        • STOP ROUTINE LOAD
        • STREAM LOAD
      • Auxiliary Commands
        • DESC
      • Data Types
        • Numeric
          • TINYINT
          • SMALLINT
          • INT
          • BIGINT
          • LARGEINT
          • DECIMAL
          • DOUBLE
          • FLOAT
          • BOOLEAN
        • String
          • CHAR
          • VARCHAR
          • STRING
        • Date
          • DATE
          • DATETIME
        • Others
          • ARRAY
          • JSON
          • BITMAP
          • HLL
      • Keywords
    • Function Reference
      • Java UDFs
      • Window functions
      • Aggregate Functions
        • avg
        • any_value
        • approx_count_distinct
        • bitmap
        • count
        • grouping
        • grouping_id
        • hll_empty
        • hll_hash
        • hll_union
        • hll_union_agg
        • max
        • min
        • multi_distinct_sum
        • multi_distinct_count
        • percentile_approx
        • percentile_cont
        • retention
        • stddev
        • stddev_samp
        • sum
        • variance, variance_pop, var_pop
        • var_samp
        • window_funnel
      • Array Functions
        • array_agg
        • array_append
        • array_avg
        • array_concat
        • array_contains
        • array_contains_all
        • array_cum_sum
        • array_difference
        • array_distinct
        • array_intersect
        • array_join
        • array_length
        • array_max
        • array_min
        • array_position
        • array_remove
        • array_slice
        • array_sort
        • array_sum
        • arrays_overlap
        • array_to_bitmap
        • reverse
        • unnest
      • Bit Functions
        • bitand
        • bitnot
        • bitor
        • bitxor
      • Bitmap Functions
        • base64_to_bitmap
        • bitmap_and
        • bitmap_andnot
        • bitmap_contains
        • bitmap_count
        • bitmap_from_string
        • bitmap_empty
        • bitmap_has_any
        • bitmap_hash
        • bitmap_intersect
        • bitmap_max
        • bitmap_min
        • bitmap_or
        • bitmap_remove
        • bitmap_to_array
        • bitmap_to_string
        • bitmap_union
        • bitmap_union_count
        • bitmap_union_int
        • bitmap_xor
        • intersect_count
        • to_bitmap
      • Conditional Functions
        • coalesce
        • if
        • ifnull
        • nullif
      • Cryptographic Functions
        • aes_encrypt
        • aes_decrypt
        • from_base64
        • md5
        • md5sum
        • md5sum_numeric
        • sha2
        • sm3
        • to_base64
      • Date Functions
        • add_months
        • adddate
        • convert_tz
        • current_date
        • current_time
        • current_timestamp
        • date
        • date_add
        • date_format
        • date_sub, subdate
        • date_trunc
        • datediff
        • day
        • dayname
        • dayofmonth
        • dayofweek
        • dayofyear
        • days_add
        • days_diff
        • days_sub
        • from_days
        • from_unixtime
        • hour
        • hours_add
        • hours_diff
        • hours_sub
        • microseconds_add
        • microseconds_sub
        • minute
        • minutes_add
        • minutes_diff
        • minutes_sub
        • month
        • monthname
        • months_add
        • months_diff
        • now
        • quarter
        • second
        • seconds_add
        • seconds_diff
        • seconds_sub
        • str_to_date
        • str2date
        • time_slice
        • time_to_sec
        • timediff
        • timestamp
        • timestampadd
        • timestampdiff
        • to_date
        • to_days
        • unix_timestamp
        • utc_timestamp
        • week
        • weekofyear
        • weeks_add
        • weeks_diff
        • weeks_sub
        • year
        • years_add
        • years_diff
        • years_sub
      • Geographic Functions
        • st_astext
        • st_circle
        • st_contains
        • st_distance_sphere
        • st_geometryfromtext
        • st_linefromtext
        • st_point
        • st_polygon
        • st_x
        • st_y
      • JSON Functions
        • Overview of JSON functions and operators
        • JSON operators
        • JSON constructor functions
          • json_array
          • json_object
          • parse_json
        • JSON query and processing functions
          • Arrow function
          • cast
          • get_json_double
          • get_json_int
          • get_json_string
          • json_each
          • json_exists
          • json_length
          • json_keys
          • json_query
          • json_string
      • Math Functions
        • abs
        • acos
        • asin
        • atan
        • atan2
        • bin
        • ceil
        • ceiling
        • conv
        • cos
        • cosh
        • cot
        • degrees
        • divide
        • e
        • exp
        • floor
        • fmod
        • greatest
        • least
        • ln
        • log
        • log2
        • log10
        • mod
        • multiply
        • negative
        • pi
        • pmod
        • positive
        • pow
        • radians
        • rand
        • round
        • sign
        • sin
        • sinh
        • sqrt
        • square
        • tan
        • tanh
        • truncate
      • String Functions
        • append_trailing_char_if_absent
        • ascii
        • char
        • char_length
        • character_length
        • concat
        • concat_ws
        • ends_with
        • find_in_set
        • group_concat
        • hex
        • instr
        • lcase
        • left
        • length
        • locate
        • lower
        • lpad
        • ltrim
        • money_format
        • null_or_empty
        • parse_url
        • repeat
        • reverse
        • right
        • rpad
        • rtrim
        • space
        • split
        • split_part
        • starts_with
        • strleft
        • strright
        • substring
        • trim
        • ucase
        • unhex
        • upper
      • Pattern Matching Functions
        • like
        • regexp
        • regexp_extract
        • regexp_replace
      • Percentile Functions
        • percentile_approx_raw
        • percentile_empty
        • percentile_hash
        • percentile_union
      • Scalar Functions
        • hll_cardinality
      • Utility Functions
        • current_version
        • isnull
        • last_query_id
        • sleep
        • uuid
        • uuid_numeric
        • version
      • cast function
      • hash function
    • System variables
    • Error code
    • System limits
  • FAQ
    • Deploy
    • Data Migration
      • Data Loading
        • Data loading
        • Stream Load
        • Routine Load
        • Broker Load
        • Insert Into
        • Flink connector
        • DataX
      • Data Unloading
    • SQL
    • Other FAQs
  • Benchmark
    • SSB Benchmark
    • TPC-H Benchmark
  • Developers
    • Contribute to StarRocks
    • Code Style Guides
      • protobuf style guides
      • thrift style guides
    • Use the debuginfo file for debugging
    • Development Environment
      • IDE Setup
      • IDEA
      • Build_StarRocks_on_Ubuntu
      • Build_Handbook
    • Trace Tools
      • Trace
  • Integration
    • Integrate with StarRocks
    • Authenticate to AWS resources