From f0eeb01b669dd6ead49757e0098154fc869b038d Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 22 Dec 2023 16:57:30 -0300 Subject: [PATCH] acelerar sqlite --- scraper/scrap.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scraper/scrap.ts b/scraper/scrap.ts index 3906d73..4df5bcc 100644 --- a/scraper/scrap.ts +++ b/scraper/scrap.ts @@ -16,6 +16,12 @@ import { join } from "path"; const sqlite = new Database("sqlite.db"); const db = drizzle(sqlite); +sqlite.run(` +pragma journal_mode = WAL; +pragma synchronous = normal; +pragma temp_store = memory; +pragma mmap_size = 30000000000; +`); sqlite.run(` create table precios( id integer primary key autoincrement,