⌘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 46 for executed (0.002 sec.)
Prepared Statements 13150
DuckDB supports prepared statements where parameters are substituted when the query is executed. This can improve readability and is useful for preventing SQL injections . Syntax There are three syntaxes for denoting parameters in prepared ... EPARE query_person AS SELECT * FROM person WHERE starts_with(name, ?) AND age >= ?; Using the CLI client, the statement is executed as follows. EXECUTE query_person('B', 40); Positional Parameters: $1 Prepared statements can use positional parameters, wh ... ARE query_person AS SELECT * FROM person WHERE starts_with(name, $2) AND age >= $1; Using the CLI client, the statement is executed as follows. Note that the first parameter corresponds to $1 , the second to $2 , and so on. EXECUTE query_person(40, 'B'); ... * FROM person WHERE starts_with(name, $name_start_letter) AND age >= $minimum_age; Using the CLI client, the statement is executed as follows. EXECUTE query_person(name_start_letter := 'B', minimum_age := 40); Session Variables as Default Values New Usi ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/prepared_statements.html
EXPLAIN: Inspect Query Plans 12281
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 ... name >= 'Ma' │ ╰──────────────────────────╯ │ ~1 row │ ╰─────────────────────────────╯ Note that the query is not actually executed – therefore, we can only see the estimated cardinality for each operator (shown with a ~ prefix, e.g., ~3 rows ), which is ...
https://man.mtool.work/duckdb/2.0/guides/meta/explain.html
Prepared Statements 10297
A prepared statement is a parameterized query. The query is prepared with question marks ( ? ) or dollar symbols ( $1 ) indicating the parameters of the query. Values can then be bound to these parameters, after which the prepared statement ... can be executed using those parameters. A single query can be prepared once and executed many times. Prepared statements are useful to: Ea ... supply parameters to functions while avoiding string concatenation/SQL injection attacks. Speeding up queries that will be executed many times with different parameters. DuckDB supports prepared statements in the C API with the duckdb_prepare method. The ... _prepared_statement prepared_statement ); duckdb_prepared_statement_type Returns the statement type of the statement to be executed Syntax duckdb_statement_type duckdb_prepared_statement_type ( duckdb_prepared_statement statement ); Parameters statement ...
https://man.mtool.work/duckdb/2.0/clients/c/prepared.html
ODBC Extension Functions 10069
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) -> ... be opened and will be closed automatically after the query is complete Optional named parameters (source): Source query is executed using a separate DB instance from the instance on which odbc_copy is being called. Thus source_query cannot refer to pre-e ... 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 of previous queries are discarded, results of all queri ... upper-case: TAB1 or in quoted form: "tab1" (or with a schema name: "schema1"."tab1" ) dest_query ( VARCHAR ): query to be executed in remote DB for each source batch, must have the number of ODBC parameter placeholders ? equal to the source_columns_coun ...
https://man.mtool.work/duckdb/2.0/core_extensions/odbc/functions.html
Executing SQL in Python 9855
SQL queries can be executed using the duckdb.sql function. import duckdb duckdb.sql("SELECT 42").show() By default this will create a relation object. The result can be converted to various formats using the result conversion functions. For ... ram. A connection to a persistent database can be created using the connect function. After connecting, SQL queries can be executed using the sql command. con = duckdb.connect("file.db") con.sql("CREATE TABLE integers (i INTEGER)") con.sql("INSERT INTO i ...
https://man.mtool.work/duckdb/2.0/guides/python/execute_sql.html
Debugging 9413
The purpose of the tests is to figure out when things break. Inevitably changes made to the system will cause one of the tests to fail, and when that happens the test needs to be debugged. First, it is always recommended to run in debug mod ... by placing mode skip in the file, followed by an optional mode unskip . Any queries between the two statements will not be executed. Triggering Which Tests to Run When running the unittest program, by default all the fast tests are run. A specific test c ... ngle test: build/debug/test/unittest test/sql/projection/test_simple_projection.test All tests in a given directory can be executed by providing the directory as a parameter with square brackets. To run all tests in the “projection” directory: build/debu ...
https://man.mtool.work/duckdb/2.0/dev/sqllogictest/debugging.html
Dot Commands 8970
Dot commands are available in the DuckDB CLI client. To use one of these commands, begin the line with a period ( . ) immediately followed by the name of the command you wish to execute. Additional arguments to the command are entered, spac ... w number of rows changed by SQL .columns Column-wise rendering of query results .connect_command ⟨COMMAND⟩ Set the command executed by the -connect argument .databases List names and files of attached databases .decimal_sep ⟨SEP⟩ Set the decimal separato ... ored single-line form .separator ⟨COL⟩ ⟨ROW⟩ Change the column and row separators .serve_command ⟨COMMAND⟩ Set the command executed by the -serve argument .shell ⟨CMD⟩ ⟨ARGS...⟩ Run CMD with ARGS... in a system shell .show Show the current values for var ... ). SQL statements separated by ; but not separated via newline are measured together .ui_command ⟨COMMAND⟩ Set the command executed by the -ui argument . CALL is prepended to COMMAND . Default: CALL start_ui() .version Show the DuckDB version .web Render ...
https://man.mtool.work/duckdb/2.0/clients/cli/dot_commands.html
Multiple Python Threads 8970
This page demonstrates how to simultaneously insert into and read from a DuckDB database across multiple Python threads. This could be useful in scenarios where new data is flowing in and an analysis should be periodically re-run. Note that ... e VARCHAR, insert_time TIMESTAMP DEFAULT current_timestamp ) """) Reader and Writer Functions Next, define functions to be executed by the writer and reader threads. Each thread must use the .cursor() method to create a thread-local connection to the sam ... will be kicked off in a random order to simulate simultaneous writers and readers. Note that the threads have not yet been executed, only defined. write_thread_count = 50 read_thread_count = 5 threads = [] # Create multiple writer and reader threads (in ...
https://man.mtool.work/duckdb/2.0/guides/python/multiple_threads.html
Command Line Arguments 8756
The table below summarizes DuckDB's command line options. To list all command line options, use the command: duckdb -help For a list of dot commands available in the CLI shell, see the Dot Commands page . Argument Description -agent Render ... cho Print commands before execution -f FILENAME Run the script in FILENAME and exit. Note that the ~/.duckdbrc is read and executed first (if it exists) -format Format SQL read from stdin , writing the result to stdout -format-file FILENAME Format the SQ ... t cannot be combined with a local database path because the CLI acts as a client for the remote database. The SQL commands executed by -serve and -connect can be customized using the .serve_command and .connect_command dot commands , e.g., in the ~/.duck ...
https://man.mtool.work/duckdb/2.0/clients/cli/arguments.html
Run Queries 8314
Overview A Connection runs SQL through two families of methods: The execute_* methods ( execute() and execute_batch() ) send statements that do not return rows, such as INSERT or DDL, and report the number of affected rows. The query_* meth ... or the Appender and other faster options. Prepared Statements Connection::prepare() compiles a statement once so it can be executed repeatedly. The returned Statement can be executed with execute() , or queried to read rows back. let mut stmt = conn.prep ...
https://man.mtool.work/duckdb/2.0/clients/rust/querying.html
PREV 1 2 3 4 5 NEXT
DuckDB 2.0 Documentation / man.mtool.work