Comments (3)
Good questions! Here are a few answers and we can add more details to the docs as well.
The tables reside in memory, but I am not certain what happens if they exceed memory (@Mytherin
or @hannes happen to know?) . I believe that they would use a temporary file if they exceeded memory?
Temporary tables last for the duration of your connection to DuckDB, so they are removed when you disconnect.
There are a number of use cases, as they are present in many databases. It can be useful to materialize an intermediate computation temporarily for many reasons (maybe you want to reuse that result set multiple times within that connection like in your case, or index it before you join on it, or just simplify your query by splitting it into pieces). Does that help? I think they are a good fit for your use case!
from duckdb-web.
The tables reside in memory, but I am not certain what happens if they exceed memory (@Mytherin or @hannes happen to know?) . I believe that they would use a temporary file if they exceeded memory?
If a temp_directory is specified chunks of the temporary table can indeed be off-loaded to disk as required. If not then an error will be thrown.
from duckdb-web.
There are basically two styles of "temporary tables" out there: global and session scoped.
Global tables are permanent tables that have a globally defined schema, but the data is private to the session (e.g., Oracle). One nasty problem with them is that you can't use them for the kind of local analytics you are describing because the temporary table name is global. This is problematic for query generating systems (like Tableau, which is where I ran into this).
Fortunately, as a single user system, DuckDB supports session scoped temporary tables. Using them to cache expensive intermediate results such as rollups is a common use case, so go for it!
from duckdb-web.
Related Issues (20)
- Issue found on page 'Text Functions' for string[begin:end]: "slice conventions" is not explained
- Document order preservation HOT 1
- Jekyll doctor doesn't find conflicting redirects
- Windows ARM64 support
- [duckdb/#12837] - `SET home_directory` doesn't do anything needs documentation
- Issue found on page 'CSV Import': CSV reader returns rows in order of lines in the file. This is important information that should be documented. HOT 2
- Add script to move documentation pages
- Document that the inet extension is out of core
- [duckdb/#12974] - URL Encode/Decode Hive Partitioning Columns/Filters + add url_encode/url_decode scalar functions needs documentation
- Issue found on page 'Star Expression' - contradiction on where COLUMNS may be used.
- count_if: sometimes behaves like an aggregate function, but sometimes not - extra documentation welcome. HOT 1
- Issue found on page 'FROM': ANTI JOIN vs NOT IN
- Issue found on page 'Attach to a DuckDB/Sqlite Database over HTTPS or S3'
- [duckdb/#13062] - Add support for overloading to macros needs documentation
- [duckdb/#13084] - Add support for SQL-level variables needs documentation
- Issue found on page 'Text Functions': bar output contains '?' after bar output, but what does that mean? HOT 2
- The minimum required Python version for python-duckdb 1.0.0 may be incorrect HOT 1
- Docs for `quantile_cont` do not describe how interpolation is calculated
- Issue found on page 'Aggregate Functions': quantile_cont(x, pos) aggregate function takes value in the range [-1, 1] for pos, needs documentation
- Issue found on page 'Querying Parquet Metadata' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duckdb-web.