ATTACH UPDATE with correlated subqueries on name_lower was doing full table scans on 13000 rows. 56 seconds on desktop, 2-5 min on phone. User saw "загрузка..." for minutes on every launch. Fix: CREATE INDEX on name_lower in both main and seed DBs before the UPDATE. Also pre-built index in seed DB file. Benchmarked: 56.5s -> 0.09s on desktop. Phone should be <1s. |
||
|---|---|---|
| .. | ||
| _seed_inserts.sql | ||
| products_seed.db | ||