Skip to content

Instantly share code, notes, and snippets.

{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
module Example where
file:///home/g/.local/bin/encoins
@Cauterization
Cauterization / test.ts
Created January 26, 2025 17:05
TEXT(64) VS BLOB
import sqlite3 from "sqlite3";
import { describe, it, expect, beforeAll, afterAll } from "vitest";
//10000
// Inserted 10000 records into blob_mempool table in 359 ms
// Retrieved 10000 records from blob_mempool table in 325 ms
// Inserted 10000 records into text_mempool table in 352 ms
// Retrieved 10000 records from text_mempool table in 360 ms
//100000
import { describe, expect, beforeAll } from "vitest";
import { Effect } from "effect";
import { Database } from "../src/services/database.js";
import { it } from "@effect/vitest";
import { InitDB } from "../src/database/index.js";
import { makeMpts, processMpts } from "../src/workers/utils/mpt.js";
import { NodeConfig } from "@/services/config.js";
import { Lucid } from "@/services/lucid.js";
import { fromHex, toHex } from "@lucid-evolution/lucid";
import { SqlClient } from "@effect/sql";