Skip to main content
This section provides an overview of Ocient data types and the components of a query. Use this guide to understand how to write effective queries against your Ocient data warehouse.

Query Basics

Ocient supports standard ANSI SQL for querying data. You can connect using JDBC or pyocient drivers and execute queries against your databases.

Running Queries

Connect to your Ocient System using one of the supported drivers:

Data Types

Ocient supports a variety of SQL data types optimized for analytics:

Scalar Types

  • Numeric - INTEGER, BIGINT, SMALLINT, TINYINT, DOUBLE, FLOAT, DECIMAL
  • String - VARCHAR, CHAR
  • Date/Time - DATE, TIME, TIMESTAMP, INTERVAL
  • Boolean - BOOLEAN
  • Binary - BINARY, VARBINARY

Complex Types

  • Arrays - Ordered collections of values
  • Tuples - Fixed-size collections of heterogeneous values
  • IP Addresses - Native support for IPv4 and IPv6
  • Geospatial - Points, lines, polygons, and other geographic data types
For detailed information about data types, see Understanding Data Types.

Query Optimization

Ocient includes several features to optimize query performance:

Indexing

  • Time Keys - Partition data by time for efficient time-series queries
  • Clustering Keys - Group frequently queried columns together
  • Secondary Indexes - Accelerate queries on specific columns

Result Set Caching

Ocient can cache query results to accelerate repeated queries. Configure caching at the database or query level.

Query Plans

Use EXPLAIN to view query execution plans and understand how Ocient will process your query.
EXPLAIN SELECT * FROM my_table WHERE date > '2024-01-01';

SQL Reference

For complete SQL reference documentation, see: