C # UWP Windows 10 project
There are two SQLite tables.
When sampling from the main table, you need to fill in the missing data from the child table (these fields in the class of the main table are marked with the [Ignore] attribute).
Sample code:
using (var db = new SQLiteConnection(SQLITE_PLATFORM, DB_PATH)) { var res = db.Table<Table1>().Where(i => i.TimeStamp >= Stamp).Select(i => { i.Param1 = db.Get<Table2>(i.table2ref).Title; i.Param2 = db.Get<Table2>(i.table2ref).Type; i.Param3 = db.Get<Table2>(i.table2ref).Symbol; return i; }); return res.ToList(); } The problem is that the .select operator (judging by the performance of the query) fills not only the result values of .Where , but the records of the entire database (in some cases, you also need to select them). With 10K + records in the database, performance, to say the least, so-so ...
Now in my main table all the required fields are filled in when Insert This gives me the opportunity to make selections very quickly, but if one of the records in the child table changes (which happens very often), I need to change all the fields associated with it in the main table and overload the interface, which is also very long.
Actually the question is how to make such samples without load on the base? Tell me the solution to this problem ...