acelerar sqlite

This commit is contained in:
Cat /dev/Nulo 2023-12-22 16:57:30 -03:00
parent 7c1d6e190a
commit f0eeb01b66

View file

@ -16,6 +16,12 @@ import { join } from "path";
const sqlite = new Database("sqlite.db"); const sqlite = new Database("sqlite.db");
const db = drizzle(sqlite); const db = drizzle(sqlite);
sqlite.run(`
pragma journal_mode = WAL;
pragma synchronous = normal;
pragma temp_store = memory;
pragma mmap_size = 30000000000;
`);
sqlite.run(` sqlite.run(`
create table precios( create table precios(
id integer primary key autoincrement, id integer primary key autoincrement,