SQLite: Bad performance with ON DELETE CASCADE
问题 I am using a SQLite Database in my application for storing measurement data. It is organized in groups in projects. The tables are interconnected with foreign keys, that use ON DELETE CASCADE to handle the links. The database looks like this: Table Projects Table Groups (Foreign Key: project_id) Table Files (Foreign Key: group_id) Table Datapoints (Foreign Key: file_id) All foreign keys reference columns declared like project_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT . The foreign keys