我有一个表中有近2600行的SQLite数据库,而在另一个表中,BI希望为第一个表中的2600行中的每一行插入一行,但是从表A中获得了一个外键 . 因为这就是我所知道的我正在查询表A中的每一行,并在表B上插入一个新行 . 我正在使用Room,我遇到的问题是我收到以下错误:

W/zygote64: Long monitor contention with owner RxCachedThreadScheduler-606 (12747) at void android.database.sqlite.SQLiteConnectionPool.releaseConnection(android.database.sqlite.SQLiteConnection)(SQLiteConnectionPool.java:364) waiters=499 in android.database.sqlite.SQLiteConnection android.database.sqlite.SQLiteConnectionPool.waitForConnection(java.lang.String, int, android.os.CancellationSignal) for 3.683s

(这不仅发生一次,而且发生了几次):

SQLiteConnectionPool: The connection pool for database '/data/user/0/me.manulorenzo.kreepty.debug/databases/coin-db' has been unable to grant a connection to thread 2192 (RxCachedThreadScheduler-180) with flags 0x1 for 33.655003 seconds. Connections: 0 active, 1 idle, 0 available.

其他时候,我得到:

android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=923 (# cursors opened by this proc=1) at android.database.CursorWindow.(CursorWindow.java:108)

说实话,我不知道该怎么做,因为我不认为数据库中有2600行很多,而且我想不出用外键插入行的任何其他方法 .

任何帮助将非常感谢!提前致谢!