Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One goofy SELECT can freeze the computer hard #29

Open
manticore-projects opened this issue Jun 10, 2024 · 0 comments
Open

One goofy SELECT can freeze the computer hard #29

manticore-projects opened this issue Jun 10, 2024 · 0 comments

Comments

@manticore-projects
Copy link

Greetings!

I do understand well the memory constraints and what happens when you cross-multiply large tables. I also understand, that DuckDB gives the power to its user to set the memory correctly. So far so good.

However, I just froze my linux machine -- twice! -- by running an unlimited cross select -- and I feel like this should not happen, especially when running in/from a Java environment (although its just a JNI bridge really).

Example is Amazon Redshift's TickDB:

are@ryzen ~ [1]> duckdb Documents/JSQLTranspiler/.manticore/JSQLTranspilerTest.duckdb 
v0.10.3 70fd6a8a24
Enter ".help" for usage hints.
D select count(*) from sales
  ;
┌──────────────┐
│ count_star() │
│    int64     │
├──────────────┤
│       172456 │
└──────────────┘

D select count(*) from listing;
┌──────────────┐
│ count_star() │
│    int64     │
├──────────────┤
│       192497 │
└──────────────┘

If I run the following statement via JDBC, my computer freezes hard. I can't even get to the terminal or login via SSH:

SELECT  numtickets
        , priceperticket
        , totalprice
        , listtime
FROM sales
    , listing
-- LIMIT 10
;

Activating the LIMIT 10 of course remedies the situation.

Now I wonder: Why would it freeze like that instead of obeying the available memory and/or why would the JDBC call not set a safety DuckDB memory limit (e.g. based on -Xmx as a good benchmark figure)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant