-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add workload
param to MySQL connection string
#57
Conversation
For MySQL users with single-query row limits (i.e. Vitess and/or Planetscale users), the workload session variable allows them to bypass the 100,000 row limit so that DuckDB can properly load tables into memory and/or on disk without manually having to write batch queries.
Thanks for the PR! Perhaps I'm not following entirely, but this seems to just append the |
Hi Mark! Sure thing, currently, the extension looks for a connection string in the format of If you try to append session variables to the end of the hostname/database name instead (e.g. Also, for reference, using However, I figured adding another connection parameter to the string would be both more simple (does not require a change in connection string-parsing method which is the same, to my knowledge, as the Postgres extension) and self documenting (Vitess/Planetscale users would have the variable visible in the shell). Otherwise, if it makes more sense, I can submit a PR to change the string parsing method from expecting a series of both space separated key/value pairs and Also, just saw the tests fail, I'll add a commit to fix that, that was a previous version. Thank you! And big fan of DuckDB Labs! |
`db_with_workload` should've been `config.workload` appended to `config.db`, not `config.host`. Also remove unnecessary `substr(1)` method call on `workload_param`. Both errors were from previous iterations on this PR.
Thanks - that makes sense. I think reworking the parsing of configuration parameters so that it supports these types of parameters is cleaner. I've recently actually cleaned up the parsing so that it allows quoted values - see #48. Perhaps that already allows this to be supported? |
No problem! Ah I didn't see that PR, that does allow this to be supported, yes, but I just tested it out, and it looks like session variables can't be appended to the database name/host this way, it looks like it might have to be done using another I'll look into it and submit a more general purpose PR for adding arbitrary session variables to the connection string. Thank you! |
For MySQL users with single-query row limits (i.e. Vitess and/or Planetscale users), the workload session variable allows them to bypass the 100,000 row limit so that DuckDB can properly load tables into memory and/or on disk without manually having to write batch queries to create a table in DuckDB from a table of 100s of thousands or millions of rows.