Results of 1 - 10 of about 157 for queries (0.002 sec.)
- Set Operations 10975
- Set operations allow queries to be combined according to set operation semantics . Set operations refer to the UNION [ALL] , INTERSECT [ALL] and EXCEPT [ALL] clauses. The vanilla variants use set semantics, i.e., they eliminate duplicates,
...while the variants with ALL use bag semantics. Traditional set operations unify queries by column position , and require the to-be-combined queries to have the same number of input columns. If the columns are n...ns. NULL values will be added in case of missing columns. UNION The UNION clause can be used to combine rows from multiple queries. The queries are required to return the same number of columns. Implicit casting to one of the returned types is performed...OM range(2) t1(x) UNION SELECT * FROM range(3) t2(x); x 2 1 0 UNION ALL (Bag Semantics) UNION ALL returns all rows of both queries following bag semantics, i.e., without duplicate elimination. SELECT * FROM range(2) t1(x) UNION ALL SELECT * FROM range(3... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/setops.html
- TPC-H Extension 9221
- The tpch extension implements the data generator and queries for the TPC-H benchmark . Installing and Loading The tpch extension is shipped by default in some DuckDB builds, otherwise it will be transparently autoloaded on first use. If you
...tpch(4); o_orderpriority order_count 1-URGENT 10594 2-HIGH 10476 3-MEDIUM 10410 4-NOT SPECIFIED 10556 5-LOW 10487 Listing Queries To list all 22 queries, run: FROM tpch_queries(); This function returns a table with columns query_nr and query . Listing...Expected Answers To produce the expected results for all queries on scale factors 0.01, 0.1 and 1, run: FROM tpch_answers(); This function returns a table with columns query_nr , scale_fa...s (a.k.a. substitution parameters). It is not possible to change the query parameters using the tpch extension. To run the queries with the parameters prescribed by the TPC-H benchmark, use a TPC-H framework implementation.... - https://man.mtool.work/duckdb/2.0/core_extensions/tpch.html
- Result Verification 9221
- The standard way of verifying results of queries is using the query statement, followed by the letter I times the number of columns that are expected in the result. After the query, four dashes ( ---- ) are expected followed by the result v
...ts more difficult to debug if they do break. After it is ensured that the system outputs the correct result, hashes of the queries in a test file can be computed by adding mode output_hash to the test file. For example: mode output_hash query II SELECT...can be used to force the program to print the result to the terminal for every query run in the test file. Result Sorting Queries can have an optional field that indicates that the result should be sorted in a specific manner. This field goes in the sa...els Another feature that can be used for result verification are query labels . These can be used to verify that different queries provide the same result. This is useful for comparing queries that are logically equivalent, but formulated differently. Q... - https://man.mtool.work/duckdb/2.0/dev/sqllogictest/result_verification.html
- ODBC Extension Functions 8782
- odbc_begin_transaction odbc_bind_params odbc_close odbc_commit odbc_connect odbc_copy odbc_create_params odbc_list_data_sources odbc_list_drivers odbc_query odbc_rollback odbc_begin_transaction odbc_begin_transaction(conn_handle BIGINT) ->
...BIGINT or VARCHAR ), one of: ODBC connection handle created with odbc_connect ODBC connection string, intended for one-off queries, in this case new ODBC connection will be opened and will be closed automatically after the query is complete Optional nam...refer to pre-existing in-memory tables and cannot open currently opened DuckDB files. As a workaround, for complex source queries it is suggested to export the query result into a local Parquet file first and then run odbc_copy on that file. source_con...* FROM '<source_file>' source_query ( VARCHAR ): DuckDB SQL query to read the data, example: FROM nl_train_stations source_queries ( LIST(VARCHAR) ): multiple DuckDB SQL queries executed one by one, last query must return the result set to copy, results... - https://man.mtool.work/duckdb/2.0/core_extensions/odbc/functions.html
- TPC-DS Extension 8782
- New In DuckDB 2.0, the dsdgen data generator was updated to match the TPC-DS version 4 tools. As a result, the generated data differs slightly from the data generated by DuckDB v1.x. See the related PR for more details. The tpcds extension
...implements the data generator and queries for the TPC-DS benchmark . Installing and Loading The tpcds extension will be transparently autoloaded on first use from t..._name sum(ss_net_profit) able -10354620.18 ation -10576395.52 bar -10625236.01 ese -10076698.16 ought -10994052.78 Listing Queries To list all 99 queries, run: FROM tpcds_queries(); This function returns a table with columns query_nr and query . Listing...Expected Answers To produce the expected results for all queries on scale factors 1 and 10, run the following (note that in DuckDB 2.0.0 this fails with a Not implemented Error for scale... - https://man.mtool.work/duckdb/2.0/core_extensions/tpcds.html
- Tuning Workloads 8517
- DuckDB aims to perform well out of the box, so most workloads do not require any tuning. When tuning is worthwhile, there is no single configuration or magic number that is optimal for every workload: the right settings depend on what you a
...files over a slow or unreliable network Tuning asynchronous I/O and minimizing IO Querying remote files Running many small queries Reusing a single connection Best practices for using connections The rest of this page covers each of these areas in detai...process datasets that are larger than the available system memory (also known as out-of-core processing ). It can also run queries where the intermediate results cannot fit into memory. This section explains the prerequisites, scope, and known limitatio...gregate states to disk, these functions can cause an out-of-memory exception when run on large datasets. Profiling If your queries are not performing as well as expected, it's worth studying their query plans: Use EXPLAIN to print the physical query pla... - https://man.mtool.work/duckdb/2.0/guides/performance/how_to_tune_workloads.html
- marimo Notebooks 8517
- marimo is an open-source reactive notebook for Python and SQL that's tightly integrated with DuckDB's Python client, letting you mix and match Python and SQL in a single git-versionable notebook. Unlike traditional notebooks, when you run a
...n f-string, letting you interpolate Python values into the query with {} (shown later). In particular, this means your SQL queries can depend on the values of UI elements or other Python values, all part of marimo's dataflow graph. Warning Heads up! If...you have user-generated content going into the SQL queries, be sure to sanitize your inputs to prevent SQL injection. Connecting a Custom DuckDB Connection To connect to a custom Du...umns in the Data Sources panel. This panel lets you quickly navigate your schemas to pull tables and columns into your SQL queries. Data Sources Panel Reference a Local Dataframe Reference a local dataframe in your SQL cell by using the name of the Pyth... - https://man.mtool.work/duckdb/2.0/guides/python/marimo.html
- PostgreSQL Extension Connection Pool 8436
- PostgreSQL server spawns a backend process for every incoming client connection. This model leads to the two following points with the postgres extension that can cause performance problems: opening a new connection is relatively expensive
...nnection pool. With it a limited number of connections are kept open (and idle) after use and can be reused for subsequent queries. Parallel Scans Due to DuckDB's multithreaded query processing, postgres extension can open multiple connections even for...queries that performs a scan for a single PostgreSQL table. The number of parallel queries running for a single table scan can be as high as the number of worker threads of the current DB instance ( threads global...configuration option). When the threads parameter is set too high (that may be necessary for local processing of other queries on DuckDB side) this can lead to attempts to open an excessive number of PostgreSQL connections. To prevent this, these pa... - https://man.mtool.work/duckdb/2.0/core_extensions/postgres/connection_pool.html
- Multiple Connections 8436
- For tests whose purpose is to verify that the transactional management or versioning of data works correctly, it is generally necessary to use multiple connections. For example, if we want to verify that the creation of tables is correctly
...he sqllogictests using connection labels . The connection label can be optionally appended to any statement or query . All queries with the same connection label will be executed in the same connection. A test that would verify the above property would...EGER); statement error con2 SELECT * FROM integers; Concurrent Connections Using connection modifiers on the statement and queries will result in testing of multiple connections, but all the queries will still be run sequentially on a single thread. If...ant to run code from multiple connections concurrently over multiple threads, we can use the concurrentloop construct. The queries in concurrentloop will be run concurrently on separate threads at the same time. concurrentloop i 0 10 statement ok CREATE... - https://man.mtool.work/duckdb/2.0/dev/sqllogictest/multiple_connections.html
- File Formats 8344
- Handling Parquet Files DuckDB has advanced support for Parquet files, which includes directly querying Parquet files . When deciding on whether to query these files directly or to first load them to the database, you need to consider severa
...ount of space for the DuckDB database file. Therefore, if the available disk space is constrained, it is worth running the queries directly on Parquet files. Reasons against Querying Parquet Files Lack of advanced statistics: The DuckDB database format...s that Parquet files do not have. These improve the accuracy of cardinality estimates, and are especially important if the queries contain a large number of join operators. Tip. If you find that DuckDB produces a suboptimal join order on Parquet files,...try loading the Parquet files to DuckDB tables. The improved statistics likely help obtain a better join order. Repeated queries: If you plan to run multiple queries on the same dataset, it is worth loading the data into DuckDB. The queries will alway... - https://man.mtool.work/duckdb/2.0/guides/performance/file_formats.html
DuckDB 2.0 Documentation / man.mtool.work