I’ll raise the default limit for the next release of System.Data.SQLite.

Sent from my iPhone

> On Jan 16, 2020, at 2:01 PM, Keith Bertram <keith.bert...@bentley.com> wrote:
> 
> Yes I recognize that this would be a problem. I plan on having no more than 
> 20-25 attachments.
> 
> If I understand correctly, the only way to set the value above 10, is to 
> recompile the source and set the SQLITE_MAX_ATTACHED variable to a number 
> higher than my 20-25 and also below 125. I was hoping to just use the .dll 
> straight out of nuget.
> 
> Keith
> 
> -----Original Message-----
> From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On Behalf 
> Of Simon Slavin
> Sent: Thursday, January 16, 2020 10:19 AM
> To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
> Subject: Re: [sqlite] sqlite3_limit equivalent in System.Data.SQLite.dll
> 
>> On 16 Jan 2020, at 3:21pm, Keith Bertram <keith.bert...@bentley.com> wrote:
>> 
>> Ok. I was hoping I could set the value to a value higher than 10 without 
>> compiling. I'm curious why the limit is set by default to 10.
> 
> The actual limit is 125.  You can set SQLITE_MAX_ATTACHED to more than 125.
> 
> It's worth explaining why you wouldn't want to attach 200 databases to the 
> same connection.  Each time you refer to an attached database, SQLite has to 
> search for that database in a list, meaning it has to match the schema name, 
> then iterate through, on average, n/2 entries to find the attachment number.  
> The longer that list gets, the slower every operation not on 'main' or 'temp' 
> gets.  (It's possible that SQLite hashes schema names, but I don't remember 
> anyone ever saying that.)
> 
> I have seen posts to this list that say things like "We make one database 
> file per day, and I want to search them all at once so I want to attach 500 
> files to my connection.".  It's a terrible idea and would result in slow 
> performance.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__mailinglists.sqlite.org_cgi-2Dbin_mailman_listinfo_sqlite-2Dusers&d=DwIGaQ&c=hmGTLOph1qd_VnCqj81HzEWkDaxmYdIWRBdoFggzhj8&r=l90GvhOo_5uKc2d8JIuoVtb0fH4diec3z4TsA-hoNTc&m=UbVOkNIBY7TVyWQB9v2LK-xBIWk_rpXp5sXbzOFNwr0&s=U-mtya649Yx5nGJacNeBxjNHS1gBxc2IssQUKmPwgbA&e=
>  
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to