Skip to main content

SELECT

SELECT

The SELECT operation allows projecting a set of columns from the underlying table. The df.pdf() API can be used for selecting the desired fields.

Loading...

SELECT DISTINCT

It is also possible to select distinct rows while projecting the table columns. The df.dpdf() API can be used for selecting distinct values.

Loading...

SQL Frames is architected for efficient usage of memory with appropriate sharing of data between DataFrames. Hence, the projection operation, while it creates a new DataFrame is a very light operation both computationally and memory wise.

Performance considerations

Some clauses of the SELECT statement result in the creation of a separate DataFrame while the other do not. For example ORDER BY doesn't create a separate DataFrame by default. If the effect of ordering data is limited to a specific query, then the DataFrame can be first filtered and then ordered and the ordering is limited only to the Filtered DataFrame. See ORDER BY for further details.

SELECT *

It is possible to use the special notation of * to select all the fields without explicitly specifying them. This is useful when the selection includes all the fields and also additional calculations.

Loading...
tip

* can be anywhere in the projected list of fields and not necessarily in the beginning.