Results of 1 - 10 of about 24 for explain (0.001 sec.)
- Profiling Queries 14278
- DuckDB supports profiling queries via the EXPLAIN and EXPLAIN ANALYZE statements. EXPLAIN To see the query plan of a query without executing it, run: EXPLAIN ⟨query⟩; The output of EXPLAIN contains the estimated cardinalities for each opera
...tor. EXPLAIN (SQL) New As of DuckDB 2.0, EXPLAIN (SQL) renders the optimized logical plan back as an executable DuckDB SQL string inste...ad of as a plan tree: sql EXPLAIN (SQL) SELECT 1 + 2 AS answer; explain_key explain_value sql SELECT CAST(3 AS INTEGER) AS answer Because the output is the...umn names, column order, and logical types, but the exact formatting and any generated aliases are not a stable interface. EXPLAIN (SQL) does not execute the query, supports only SELECT , VALUES , WITH , INSERT , UPDATE , DELETE and MERGE INTO statement... - https://man.mtool.work/duckdb/2.0/sql/statements/profiling.html
- EXPLAIN: Inspect Query Plans 11893
- EXPLAIN SELECT * FROM tbl; The EXPLAIN statement displays the physical plan, i.e., the query plan that will get executed, and is enabled by prepending the query with EXPLAIN . The physical plan is a tree of operators that are executed in a
...1), ('Joe', 2), ('Matthew', 3); INSERT INTO exams VALUES (10, 'Physics', 1), (20, 'Chemistry', 2), (30, 'Literature', 3); EXPLAIN SELECT name FROM students JOIN exams USING (sid) WHERE name LIKE 'Ma%'; ╭─ Projection ─────────────╮ │ Projections: name │...scan operators display the fully qualified table name including catalog and schema (e.g., memory.main.exams ). Additional Explain Settings The EXPLAIN statement supports additional settings that can be used to control the output. The following settings...are available: The default setting. Only shows the physical plan. SET explain_output = 'physical_only'; Shows only the optimized plan. SET explain_output = 'optimized_only'; Shows both the physical an... - https://man.mtool.work/duckdb/2.0/guides/meta/explain.html
- Troubleshooting 10175
- Troubleshooting Running EXPLAIN Renders Newlines In Python, the output of the EXPLAIN statement contains hard line breaks ( \n ): In [1]: import duckdb ...: duckdb.sql("EXPLAIN SELECT 42 AS x") Out[1]: ┌───────────────┬─────────────────────
...─────────────────────────────────────────────────────────────────────────────────┐ │ explain_key │ explain_value │ │ varchar │ varchar │ ├───────────────┼─────────────────────────────────────────────────────────────...────────────────────────────────────────────────────────────────────────────┘ To work around this, print the output of the explain() function: In [2]: print(duckdb.sql("SELECT 42 AS x").explain()) Out[2]: ╭─ Projection ───╮ │ Projections: x │ │ ~1 row │...╰────────┬───────╯ ╭─ Dummy Scan ───╮ ╰────────────────╯ In a Jupyter notebook, explain() displays the plan as HTML itself and returns an empty string, so printing it prints nothing. Please also check out the J... - https://man.mtool.work/duckdb/2.0/clients/python/known_issues.html
- Profiling 9974
- Profiling is essential to help understand why certain queries exhibit specific performance characteristics. DuckDB contains several built-in features to enable query profiling, which this page covers. For a high-level example of using EXPLAIN
...IN , see the “Inspect Query Plans” page . Statements The EXPLAIN Statement The first step to profiling a query can include examining the query plan. The EXPLAIN statement shows the query...plan and describes what is going on under the hood. The EXPLAIN ANALYZE Statement The query plan helps developers understand the performance characteristics of the query. However, it is...lso necessary to examine the performance numbers of individual operators and the cardinalities that pass through them. The EXPLAIN ANALYZE statement enables obtaining these, as it pretty-prints the query plan and also executes the query. Thus, it provid... - https://man.mtool.work/duckdb/2.0/dev/profiling.html
- EXPLAIN ANALYZE: Profile Queries 9207
- Prepending a query with EXPLAIN ANALYZE both pretty-prints the query plan, and executes it, providing run-time performance numbers and the actual cardinality (number of rows produced) for every operator. EXPLAIN ANALYZE SELECT * FROM tbl; N
...eads (e.g., reading multiple Parquet files), the output includes the file names being read. Below is an example of running EXPLAIN ANALYZE on a query: CREATE TABLE students (name VARCHAR, sid INTEGER); CREATE TABLE exams (eid INTEGER, subject VARCHAR, s...1), ('Joe', 2), ('Matthew', 3); INSERT INTO exams VALUES (10, 'Physics', 1), (20, 'Chemistry', 2), (30, 'Literature', 3); EXPLAIN ANALYZE SELECT name FROM students JOIN exams USING (sid) WHERE name LIKE 'Ma%'; ╭─ Summary ───────────╮ │ Total Time: 0.00... - https://man.mtool.work/duckdb/2.0/guides/meta/explain_analyze.html
- Pragmas 8290
- The PRAGMA statement is a SQL extension adopted by DuckDB from SQLite. PRAGMA statements can be issued in a similar manner to regular SQL statements. PRAGMA commands may alter the internal state of the database engine, and can influence the
...piled for, e.g., osx_arm64 . The format of this identifier matches the platform name as described in the extension loading explainer : PRAGMA platform; CALL pragma_platform(); User Agent The following statement returns the user agent information, e.g.,...ss_bar; Don't show a progress bar for running queries: PRAGMA disable_progress_bar; Or: PRAGMA disable_print_progress_bar; EXPLAIN Output The output of EXPLAIN can be configured to show only the physical plan. The default configuration of EXPLAIN : SET...explain_output = 'physical_only'; To only show the optimized query plan: SET explain_output = 'optimized_only'; To show all query plans: SET explain_output = 'all'; Profiling Enable Profiling The following q... - https://man.mtool.work/duckdb/2.0/configuration/pragmas.html
- CREATE VIEW Statement 8240
- The CREATE VIEW statement defines a new view in the catalog. Examples Create a simple view: CREATE VIEW view1 AS SELECT * FROM tbl; Create a view or replace it if a view with that name already exists: CREATE OR REPLACE VIEW view1 AS SELECT
...SECURE VIEW feature was introduced in DuckDB 2.0. Create a secure view (hides internals from functions such as stats() and EXPLAIN ANALYZE ): CREATE SECURE VIEW users AS SELECT username FROM all_users WHERE access_level = 'standard'; The SQL query behin...y would filter out (for example via stats() ). Secure views return NULL for those internals and show a Secure View node in EXPLAIN ANALYZE . If a schema name is given then the view is created in the specified schema. Otherwise, it is created in the curr... - https://man.mtool.work/duckdb/2.0/sql/statements/create_view.html
- AutoComplete Extension 7889
- The autocomplete extension adds support for autocomplete in the CLI client . The extension is shipped by default with the CLI client. Behavior For the behavior of the autocomplete extension, see the documentation of the CLI client . Functio
...ion suggestion_start SELECT 0 DELETE 0 INSERT 0 CALL 0 LOAD 0 CALL 0 ALTER 0 BEGIN 0 EXPORT 0 CREATE 0 PREPARE 0 EXECUTE 0 EXPLAIN 0 ROLLBACK 0 DESCRIBE 0 SUMMARIZE 0 CHECKPOINT 0 DEALLOCATE 0 UPDATE 0 DROP 0... - https://man.mtool.work/duckdb/2.0/core_extensions/autocomplete.html
- Tuning Workloads 7889
- 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
...n 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 limitations of larger-than-memory processing in DuckDB. Spilling to Disk Larger-than-...rge 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 plan without running the query. Use EXPLAIN ANALYZE to run and profile the query. This will sh...his increases the effectiveness of the filters in reducing IO. To inspect how much remote data is transferred for a query, EXPLAIN ANALYZE can be used to print out the total number of requests and total data transferred for queries on remote files. Cach... - https://man.mtool.work/duckdb/2.0/guides/performance/how_to_tune_workloads.html
- Delta Extension 7739
- The delta extension adds support for the Delta Lake open-source storage format . It is built using the Delta Kernel . The extension reads Delta tables, local and remote, and writes them: it can create tables and append to them. For implemen
...logging of the Delta Kernel to the DuckDB logger. May impact performance even when DuckDB logging is disabled. delta_scan_explain_files_filtered BOOLEAN true Add the filtered files to the EXPLAIN output. May impact the performance of delta_scan during... - https://man.mtool.work/duckdb/2.0/core_extensions/delta.html
DuckDB 2.0 Documentation / man.mtool.work