Without more details it’s hard to debug. Is the data static? Not all rows are created equal.
Without more details it’s hard to debug. Is the data static? Not all rows are created equal.

Error: D1_ERROR: Error: Network connection lost. errors with fairly simple (yet critical) queries my worker is running. The DB is using the experimental d1 backend. Is there a tried and true way to get to the bottom of why this is happening?wrangler d1 execute), which allows more granular control than the Ui in the dashboard, and repeatable creations.
-- Create a table. And an external content fts5 table to index it.
CREATE TABLE tbl(a INTEGER PRIMARY KEY, b, c);
CREATE VIRTUAL TABLE fts_idx USING fts5(b, c, content='tbl', content_rowid='a');
-- Triggers to keep the FTS index up to date.
CREATE TRIGGER tbl_ai AFTER INSERT ON tbl BEGIN
INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
END;
CREATE TRIGGER tbl_ad AFTER DELETE ON tbl BEGIN
INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
END;
CREATE TRIGGER tbl_au AFTER UPDATE ON tbl BEGIN
INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
END;
"@cloudflare/workers-types": "^4.20230710.1"first return Record<string, T> but not T? 4.20230518.0:DROP TABLE IF EXISTS [table001] statement, and wrangler returns an error no such table: main.[table001]?
main.table_name. Just table_name.
DROP TABLE IF EXISTS runs fine in DBeaver, but not wrangler@3.20
Error: D1_ERROR: Error: Network connection lost.d1wrangler d1 execute
-- Create a table. And an external content fts5 table to index it.
CREATE TABLE tbl(a INTEGER PRIMARY KEY, b, c);
CREATE VIRTUAL TABLE fts_idx USING fts5(b, c, content='tbl', content_rowid='a');
-- Triggers to keep the FTS index up to date.
CREATE TRIGGER tbl_ai AFTER INSERT ON tbl BEGIN
INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
END;
CREATE TRIGGER tbl_ad AFTER DELETE ON tbl BEGIN
INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
END;
CREATE TRIGGER tbl_au AFTER UPDATE ON tbl BEGIN
INSERT INTO fts_idx(fts_idx, rowid, b, c) VALUES('delete', old.a, old.b, old.c);
INSERT INTO fts_idx(rowid, b, c) VALUES (new.a, new.b, new.c);
END;
"@cloudflare/workers-types": "^4.20230710.1"firstRecord<string, T>T4.20230518.0DROP TABLE IF EXISTS [table001]no such table: main.[table001]?main.table_nametable_nameDROP TABLE IF EXISTSdeclare abstract class D1PreparedStatement {
bind(...values: any[]): D1PreparedStatement;
first<T = unknown>(colName: string): Promise<T | null>;
first<T = unknown>(): Promise<Record<string, T> | null>;
run<T = unknown>(): Promise<D1Result<T>>;
all<T = unknown>(): Promise<D1Result<T[]>>;
raw<T = unknown>(): Promise<T[]>;
}declare abstract class D1PreparedStatement {
bind(...values: any[]): D1PreparedStatement;
first<T = unknown>(colName?: string): Promise<T>;
run<T = unknown>(): Promise<D1Result<T>>;
all<T = unknown>(): Promise<D1Result<T>>;
raw<T = unknown>(): Promise<T[]>;
}