You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#6358 removes some uses of it, but other uses are difficult to eliminate.
#6355 proposes using temporary tables.
Instead of IN (?, ?, ?, ...) it is possible to open a transaction, create a temporary table, populate it with needed values in a loop, then select from it using IN (SELECT * FROM temp_table).
The text was updated successfully, but these errors were encountered:
Using `repeat_vars()` to generate SQL statements led to some of them having more than
`SQLITE_MAX_VARIABLE_NUMBER` parameters and thus failing, so let's get rid of this pattern. But
let's not optimise for now and just repeat executing an SQL statement in a loop, all the places
where `repeat_vars()` is used seem not performance-critical and containing functions execute other
SQL statements in loops. If needed, performance can be improved by preparing a statement and
executing it in a loop. An exception is `lookup_chat_or_create_adhoc_group()` where `repeat_vars()`
can't be replaced with a query loop, there we need to replace the `SELECT` query with a transaction
creating a temporary table which is used to perform the SELECT query then. Not good that a read
transaction is replaced with a write one, but `lookup_chat_or_create_adhoc_group()` is a heavy
function anyway which calls `create_adhoc_group()`, so this shouldn't affect performance a lot.
#6358 removes some uses of it, but other uses are difficult to eliminate.
#6355 proposes using temporary tables.
Instead of
IN (?, ?, ?, ...)
it is possible to open a transaction, create a temporary table, populate it with needed values in a loop, then select from it usingIN (SELECT * FROM temp_table)
.The text was updated successfully, but these errors were encountered: