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 http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users