Queries/Batches are automatically run in a transaction, but you cannot initiate them manually
Queries/Batches are automatically run in a transaction, but you cannot initiate them manually
Rows read is so big after using an index.15,932 is the total number or rows in the table - 
D1_ERROR: D1 is overloaded. Requests queued for too long


Accounts is the main table with foreign key in all other tables, so when a customer delete an account it freeze everything. Any suggestions?
EXPLAIN QUERY PLAN on all tablesPRAGMA index_list('TableName'); and when I did a simple query on the table with EXPLAIN QUERY PLAN select * from TableName where UserId = 'abc' it reported use of SCAN (full table scan). So I think that confirms to me that the FK indexes are not created automatically. Thank you for highlighting this, as I'll need to revisit the schema's for my SQLite apps.
Rows read15,932Select * from Jobs where status = 'scheduled' and scheduled_at <= datetime('now')CREATE INDEX if not exists scheduled_jobs_search ON Jobs (scheduled_at, status);CREATE INDEX if not exists scheduled_jobs_search ON Jobs (status,
scheduled_at);D1_ERROR: D1 is overloaded. Requests queued for too longDelete from Accounts where account_id = ?AccountsPRAGMA index_list('TableName');EXPLAIN QUERY PLAN select * from TableName where UserId = 'abc'