-
Notifications
You must be signed in to change notification settings - Fork 49
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
Too many SQL variables error #129
Comments
I don't know what the performance implications of bumping that limit up is. We should go look at sqlite3 in ruby to see what it does for active record. I'd err towards the side of documentation versus bumping the limit. |
@kevinlang maybe we could figure out a way to support it just being left at default but also allowing someone who knows what they are doing to bump the limit up. |
Ran into this today. The limit is well documented in point 9 here: https://sqlite.org/limits.html, but exqlite seems to hit this error below the 32k variable limit somehow. There's also supposedly a way to reduce this limit at runtime, which might complicate how we might want to expose this. Edit: ran into this issue while testing, so this isn't a big deal for me. Just wanted to chip in. |
@thomastay curious what were you doing to hit that limit? bulk inserting? |
yeah, this is for a small personal project of mine. The API that I'm using can generate a lot of nested data, which when normalized can result in inserting about 10k rows in a join table. Doing 10k insert statements is pretty slow, so I did an insert all and hit this issue. It's pretty easy to get around this by chunking the inserts by 999, just wanted to bring this up. |
Interesting. Think you can mock up a dummy integration test for us and we can get this to be configurable / able to better handle that situation? |
@warmwaffles sure, i'll work on it sometime this week if i get the chance. was out last week. Is it ok if i write the test in ecto_sqlite3, since my issue is really starting from there? |
While cleaning up the benchmarks in
ecto_sqlite3
, I hit this error due to the benchmarks setup code that usedinsert_all
hitting this limit.Couple options I can think of:
FWIW you can see the code that hits this limit by looking at
sqlite.c:101742
(3) seems like a reasonable choice. The trade off is mentioned in
sqlite.c
:The text was updated successfully, but these errors were encountered: