--- title: "Query Engine, Trino, Spark and the SDK compared" slug: "dev-database-reference-sql-engine-comparison" updated: 2026-10-30T18:19:11Z published: 2026-10-30T18:19:11Z canonical: "docs.vastdata.com/dev-database-reference-sql-engine-comparison" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Query Engine, Trino, Spark and the SDK compared *Applies to VAST Cluster 5.5.* Four clients work on the same VAST DataBase tables: the VAST Query Engine (SQL over ADBC, inside the cluster), Trino and Spark (with the VAST connectors), and the Python SDK. This page compares what each can do in VAST Cluster 5.5. Each cell links to the page that documents it. "Not covered" means no page in these docs covers it. | Capability | VAST Query Engine | Trino | Spark | Python SDK | | --- | --- | --- | --- | --- | | Interface | SQL over ADBC, run in the cluster ([ADBC](/develop/docs/dev-database-integrations-adbc)) | SQL, through the VAST connector ([Trino](/develop/docs/dev-database-integrations-trino)) | Spark SQL and DataFrames, through the VAST connector ([Spark](/develop/docs/dev-database-integrations-spark)) | Python API with Arrow results ([Python SDK](/develop/docs/dev-database-integrations-python-sdk)) | | Filters pushed down to VAST DataBase | Comparisons with constants, ranges, `IS NULL`, `OR` on one column, consecutive `IN` lists. Functions, wildcard `LIKE` and `OR` across columns run in the engine ([SELECT](/develop/docs/dev-database-reference-sql-select#where-filters-run)) | Per-column filters, `IN`, `LIKE '%substring%'`; `OR` across columns with a session property ([Trino](/develop/docs/dev-database-integrations-trino#what-vast-database-does-for-your-query)) | Per-column filters, `IN`, `IS NULL`, `OR` on one column; no `LIKE` ([Spark](/develop/docs/dev-database-integrations-spark#what-vast-database-does-for-your-query)) | An `AND` of one-column `OR` groups; anything else raises `NotImplementedError` ([pushdowns](/develop/docs/dev-database-reference-pushdowns#python-sdk)) | | Aggregation | Without `GROUP BY` only ([SELECT](/develop/docs/dev-database-reference-sql-select#aggregates)) | With `GROUP BY` ([ingest](/develop/docs/dev-database-guides-ingest#trino)) | With `GROUP BY` ([ingest](/develop/docs/dev-database-guides-ingest#spark)) | None: aggregate the Arrow result ([querying](/develop/docs/dev-database-guides-querying#vast-query-engine)) | | `ORDER BY` | Only with `LIMIT` ([SELECT](/develop/docs/dev-database-reference-sql-select)) | Yes ([Trino](/develop/docs/dev-database-integrations-trino#creating-tables-and-writing-data)) | Yes ([Spark](/develop/docs/dev-database-integrations-spark#spark-sql-and-dataframes)) | Not covered | | Joins | No ([not supported](/develop/docs/dev-database-reference-sql-not-supported)) | Yes, with dynamic filtering into VAST DataBase ([pushdowns](/develop/docs/dev-database-reference-pushdowns#trino)) | Not covered | No join API ([SDK reference](/develop/docs/dev-database-reference-sdk)) | | `UPDATE`, `DELETE` | Yes ([UPDATE](/develop/docs/dev-database-reference-sql-update), [DELETE](/develop/docs/dev-database-reference-sql-delete)) | Yes, and `MERGE` ([updates and deletes](/develop/docs/dev-database-guides-updates-and-deletes#trino)) | Yes ([updates and deletes](/develop/docs/dev-database-guides-updates-and-deletes#spark)) | `update()` and `delete()` by row ID ([updates and deletes](/develop/docs/dev-database-guides-updates-and-deletes)) | | Transactions | Per statement, or `autocommit=False` with `commit()` and `rollback()`; SQL `BEGIN` refused ([SQL reference](/develop/docs/dev-database-reference-sql-index#how-sql-reaches-the-engine)) | `START TRANSACTION` ([transactions](/develop/docs/dev-database-guides-transactions-in-practice#trino)) | `ndb.create_tx()` ([transactions](/develop/docs/dev-database-guides-transactions-in-practice#spark)) | `session.transaction()` ([transactions](/develop/docs/dev-database-guides-transactions-in-practice)) | | Sorted tables | Create (`SORT KEY`), add a sort key, use ([CREATE TABLE](/develop/docs/dev-database-reference-sql-create-table#sorted-tables)) | Make a table sorted (`sorted_by`), use ([Trino](/develop/docs/dev-database-integrations-trino#sorted-tables)) | Whether Spark can enable sorting is unconfirmed ([Spark](/develop/docs/dev-database-integrations-spark#sorted-tables)) | `add_sorting_key()` ([SDK reference](/develop/docs/dev-database-reference-sdk#sorting)) | | Partitioned tables | No: every statement is refused ([not supported](/develop/docs/dev-database-reference-sql-not-supported)) | Yes ([Trino](/develop/docs/dev-database-integrations-trino#partitioned-tables)) | Yes ([Spark](/develop/docs/dev-database-integrations-spark#partitioned-tables)) | Yes ([SDK reference](/develop/docs/dev-database-reference-sdk#partitions)) | | Vector index search | Yes ([vector search SQL](/develop/docs/dev-database-reference-sql-vector-search)) | No ([Trino](/develop/docs/dev-database-integrations-trino#not-available-through-trino)) | No ([Spark](/develop/docs/dev-database-integrations-spark#what-vast-database-does-for-your-query)) | `vector_search()`, which runs through the Query Engine ([SDK reference](/develop/docs/dev-database-reference-sdk#vector-search)) | | Creating a vector index | `VECTOR CLUSTER BY` ([vector search SQL](/develop/docs/dev-database-reference-sql-vector-search)) | No vector type ([data types](/develop/docs/dev-database-reference-data-types#engine-differences)) | No vector type ([data types](/develop/docs/dev-database-reference-data-types#engine-differences)) | `VectorIndexSpec` ([SDK reference](/develop/docs/dev-database-reference-sdk#vector-index)) | | Parquet import | `INSERT` into `"<table> vast.import_data"` ([import Parquet files](/develop/docs/dev-database-reference-sql-import-parquet)) | `INSERT` into `"<table> vast.import_data()"` ([ingest](/develop/docs/dev-database-guides-ingest#trino)) | `INSERT` into ``<table> vast.import_data()`` ([ingest](/develop/docs/dev-database-guides-ingest#spark)) | `import_files()` ([ingest](/develop/docs/dev-database-guides-ingest#import-parquet-files)) | | `CREATE TABLE ... AS SELECT` | No; `CREATE TABLE`, then `INSERT ... SELECT` ([CREATE TABLE](/develop/docs/dev-database-reference-sql-create-table)) | Yes ([ingest](/develop/docs/dev-database-guides-ingest#trino)) | Yes ([ingest](/develop/docs/dev-database-guides-ingest#load-with-trino-spark-or-the-vast-query-engine)) | `util.create_table_from_files()` creates a table from Parquet files ([ingest](/develop/docs/dev-database-guides-ingest#create-a-table-from-files)) | | Views | No ([not supported](/develop/docs/dev-database-reference-sql-not-supported)) | Yes, with limits ([Trino](/develop/docs/dev-database-integrations-trino#views)) | Yes ([Spark](/develop/docs/dev-database-integrations-spark#views)) | Not covered | | Reading snapshots | `"<bucket>/.snapshot/<snapshot>/<schema>".<table>` ([SELECT](/develop/docs/dev-database-reference-sql-select#snapshots)) | Not covered | Not covered | `bucket.snapshot()` ([snapshots](/develop/docs/dev-database-operations-snapshots-and-replication#read-a-table-in-a-snapshot)) | | Event Broker topic tables | Read ([query topics](/develop/docs/dev-event-broker-guides-querying-topics)) | Read ([query topics](/develop/docs/dev-event-broker-guides-querying-topics#query-with-trino-or-spark)) | Read ([query topics](/develop/docs/dev-event-broker-guides-querying-topics#query-with-trino-or-spark)) | Not covered | | Row filters and column masks | The table is refused ([vector search security](/develop/docs/dev-vector-search-operations-security#which-rules-work-with-vector-search)) | Applied ([Trino](/develop/docs/dev-database-integrations-trino#row-and-column-security)) | Not confirmed for 5.5 ([security](/develop/docs/dev-database-operations-security#which-engines-support-it)) | `select()` is refused with 403 ([vector search security](/develop/docs/dev-vector-search-operations-security#which-rules-work-with-vector-search)) | | Column allow and deny | Applied ([vector search security](/develop/docs/dev-vector-search-operations-security#column-security)) | Applied ([Trino](/develop/docs/dev-database-integrations-trino#row-and-column-security)) | Not covered | Not covered | | End-user impersonation | `vast.db.end_user` ([ADBC](/develop/docs/dev-database-integrations-adbc#run-queries-as-an-end-user)) | Yes, with the catalog's security flags ([Trino](/develop/docs/dev-database-integrations-trino#what-the-catalog-needs)) | Not supported ([security](/develop/docs/dev-database-operations-security#impersonation)) | `end_user=`, for ADBC calls only ([ADBC](/develop/docs/dev-database-integrations-adbc#run-queries-as-an-end-user)) | ## Choosing - **The Query Engine** suits SQL from your own application, aggregates over one table, top-N queries and vector search, with no engine to run. It reads one table per query. - **Trino or Spark** suit joins, grouping, views, partitioned tables and large transformations. - **The Python SDK** suits bulk reads and writes as Arrow data, and table structures the SQL engines can't create, such as semi-sorted projections. [Ingest](/develop/docs/dev-database-guides-ingest#load-with-trino-spark-or-the-vast-query-engine), [querying](/develop/docs/dev-database-guides-querying#query-with-trino-spark-or-the-vast-query-engine) and [updates and deletes](/develop/docs/dev-database-guides-updates-and-deletes#update-and-delete-with-trino-spark-or-the-vast-query-engine) show the same task in each.