Documentation — Concepts
SynSQL serves two kinds of datasets with the same SQL and the same commands. They are stored differently, and they do not support exactly the same operations. This page tells you which kind you have, and what it changes. Every command page of this documentation says so when the two kinds behave differently.
A narrow table has up to 1500 columns. Its rows are cut into partitions by the value of the hash key. Each partition is a table stored whole on a data broker, so a row is read in one place. The Gaia DR3 catalog is a narrow table: gaia_source has about 1.8 billion rows and 152 columns, in 600 partitions.
A narrow table supports joins (up to 16 tables), order by and limit, adding a column after deployment, and it can be deployed close to another table so that joins stay inside one partition.
A wide table has more than 1500 columns, or was created with create table T wide;. Its columns are cut into chunks of about 1500 columns. Each chunk is its own table on the data brokers, and the hash key columns are repeated in every chunk. Reading a row means reading its chunks and assembling them. A multi-omics table is wide: multi_omics has 585,011 columns in 391 chunks.
A wide table does not support:
group by and order by;deploy table);deploy table T close to ....A select on a wide table must select all the columns of the hash key. Filtering with or on columns that live in distant chunks forces the server to assemble every candidate row, which is expensive: measure before you rely on it. Inserting one row costs more than for a narrow table because every chunk receives its part.
describe single_cell;
The line Wide says no for a narrow table, and yes - 14 chunks (for example) for a wide one.
create table T wide; to say it from the start.Both kinds live in the same cluster, under the same accounts and the same privileges.