⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 20 for ordered (0.002 sec.)
Indexing 13425
DuckDB has two types of indexes: zonemaps and ART indexes. Zonemaps DuckDB automatically creates zonemaps (also known as min-max indexes) for the columns of all general-purpose data types . Operations like predicate pushdown into scan opera ... lock with a min-max range of 1000 to 2000 when comparing for = 123 or < 400 ). The Effect of Ordering on Zonemaps The more ordered the data within a column, the more valuable the zonemap indexes will be. For example, a column could contain a random numb ... t to pre-order data by those columns when inserting it. Even an imperfect ordering will still be helpful. The best case of ordered data commonly arises with DATETIME columns. Microbenchmark: The Effect of Ordering For an example, let's repeat the microb ... enchmark for timestamps with an ordered timestamp column using an ascending order vs. an unordered one. Column type Ordered Storage size Query time DATETIME yes 1 ...
https://man.mtool.work/duckdb/2.0/guides/performance/indexing.html
Aggregate Functions 12813
Examples Produce a single row containing the sum of the amount column: SELECT sum(amount) FROM sales; Produce one row per unique region, containing the sum of amount for each group: SELECT region, sum(amount) FROM sales GROUP BY region; Ret ... rg, val, n) The generalized case of arg_max for n values: returns a LIST containing the arg expressions for the top n rows ordered by val descending. This function is affected by ordering . arg_max_null(arg, val) Finds the row with the maximum val and c ... y selected if there are no other rows. If n is specified, returns a LIST containing the arg expressions for the top n rows ordered by val descending, with NULL values of val last. This function is affected by ordering . arg_min(arg, val) Finds the row w ... ction is affected by ordering . arg_min(arg, val, n) Returns a LIST containing the arg expressions for the "bottom" n rows ordered by val ascending. This function is affected by ordering . arg_min_null(arg, val) Finds the row with the minimum val and ca ...
https://man.mtool.work/duckdb/2.0/sql/functions/aggregates.html
Join Operations 9771
How to Force a Join Order DuckDB has a cost-based query optimizer, which uses statistics in the base tables (stored in a DuckDB database or Parquet files) to estimate the cardinality of operations. Turn off the Join Order Optimizer To turn ... gorithm. The approximate_join_order_threshold setting controls when this happens: joins with at least this many tables are ordered approximately, while joins with fewer tables are ordered exactly. The default value is 12. For example, to use the exact a ...
https://man.mtool.work/duckdb/2.0/guides/performance/join_operations.html
Map Type 9159
MAP s are similar to STRUCT s in that they are an ordered list of key-value pairs. However, MAP s do not need to have the same keys present for each row, and thus are suitable for use cases where the schema is unknown beforehand or varies p ... G clauses, as well as for creating Boolean values . The ordering is defined positionally in the same way that words can be ordered in a dictionary. NULL values compare greater than all other values and are considered equal to each other. At the top leve ...
https://man.mtool.work/duckdb/2.0/sql/data_types/map.html
ORDER BY Clause 9006
ORDER BY is an output modifier. Logically it is applied near the very end of the query (just prior to LIMIT or OFFSET , if present). The ORDER BY clause sorts the rows on the sorting criteria in either ascending or descending order. In addi ... oose Ln', 'Duck Town', '11111' UNION ALL SELECT '111 Duck Duck Goose Ln', 'Duck Town', '11111-0001'; Select the addresses, ordered by city name using the default NULL order and default order: SELECT * FROM addresses ORDER BY city; Select the addresses, ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/orderby.html
Data Types 8853
General-Purpose Data Types The table below shows all the built-in general-purpose data types. The alternatives listed in the aliases column can be used to refer to these types as well, however, note that the aliases are not part of the SQL ... nd has a different structure. Name Description Rules when used in a column Build from values Define in DDL/CREATE ARRAY An ordered, fixed-length sequence of data values of the same type. Each row must have the same data type within each instance of the ... ARRAY and the same number of elements. [1, 2, 3] INTEGER[3] LIST An ordered sequence of data values of the same type. Each row must have the same data type within each instance of the LIST , but can ...
https://man.mtool.work/duckdb/2.0/sql/data_types/overview.html
Collations 8547
Collations provide rules for how text should be sorted or compared in the execution engine. Collations are useful for localization, as the rules for how text should be ordered are different for different languages or for different countries ... e when performing sorting and comparison operations. By default, the BINARY collation is used. That means that strings are ordered and compared based only on their binary contents. This makes sense for standard ASCII characters (i.e., the letters A-Z an ...
https://man.mtool.work/duckdb/2.0/sql/expressions/collations.html
Window Functions 8089
DuckDB supports window functions , which can use multiple rows to calculate a value for each row. Window functions are blocking operators , i.e., they require their entire input to be buffered, making them one of the most memory-intensive o ... eed a number for each row in a table, you can use the rowid pseudocolumn . Generate a row_number column to enumerate rows, ordered by time : SELECT row_number() OVER (ORDER BY time) FROM sales; Generate a row_number column to enumerate rows, ordered by ... indow functions and order-sensitive aggregate functions , and the order of framing are not well-defined. Each partition is ordered using the same ordering clause. Here is a table of power generation data, available as a CSV file ( power-plant-generation ...
https://man.mtool.work/duckdb/2.0/sql/functions/window_functions.html
Reading and Writing Parquet Files 7936
Examples Read a single Parquet file: SELECT * FROM 'test.parquet'; Figure out which columns/types are in a Parquet file: DESCRIBE SELECT * FROM 'test.parquet'; Create a table from a Parquet file: CREATE TABLE test AS SELECT * FROM 'test.par ... ns to be loaded as BLOB instead. Set this to true to load binary columns as strings. BOOL false bound_schema The complete, ordered output schema of the scan as a struct of column names and types (e.g., {'a': 'BIGINT', 'b': 'VARCHAR'} ). Columns are matc ... e, the reader accounts for NaN when using a column's min/max statistics for filter pushdown, since NaN does not compare as ordered. BOOL false encryption_config Configuration for Parquet encryption . STRUCT - filename Whether or not an extra filename co ...
https://man.mtool.work/duckdb/2.0/data/parquet/overview.html
FROM and JOIN Clauses 7783
The FROM clause specifies the source of the data on which the remainder of the query should operate. Logically, the FROM clause is where the query starts execution. The FROM clause can contain a single table, a combination of multiple table ... 0; i < n; i++) { f(t1.a[i], t2.b[i]); } It is difficult to express this in standard SQL because relational tables are not ordered, but imported tables such as data frames or disk files (like CSVs or Parquet files ) do have a natural ordering. Connectin ... nd the missing entries are filled with NULL values. As-Of Joins A common operation when working with temporal or similarly-ordered data is to find the nearest (first) event in a reference table (such as prices). This is called an as-of join: Attach pric ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/from.html
PREV 1 2 NEXT
DuckDB 2.0 Documentation / man.mtool.work