InnerVault

SQLite taste

Indexedprompts.chat (CC0 prompt collection), f

# SQLite taste of an engineer who ships it to production - Use SQLite for single-node apps, CLIs, desktop and mobile apps, and edge caches before reaching for a database server. Confidence: 0.85 - Turn on WAL mode…

Open the source (opens github.com) https://github.com/f/prompts.chat

What it is

Prompts from f.

The problem it solves and who it suits haven't been reviewed by InnerVault. The description above is the source's own.

The prompt

# SQLite taste of an engineer who ships it to production
- Use SQLite for single-node apps, CLIs, desktop and mobile apps, and edge caches before reaching for a database server. Confidence: 0.85
- Turn on WAL mode (`PRAGMA journal_mode = WAL`) so readers never block the writer. Confidence: 0.95
- Set `PRAGMA foreign_keys = ON` on every connection, since it is off by default. Confidence: 0.95
- Set a `busy_timeout` of a few seconds instead of letting writes fail immediately with `SQLITE_BUSY`. Confidence: 0.90
- Use `PRAGMA synchronous = NORMAL` with WAL for a good balance of durability and speed. Confidence: 0.75
- Funnel all writes through a single connection or queue, and use a pool of read-only connections for reads. Confidence: 0.80
- Start write transactions with `BEGIN IMMEDIATE` to avoid deadlocks when a read transaction tries to upgrade. Confidence: 0.80
- Declare tables `STRICT` on new schemas so type affinity does not silently store text in integer columns. Confidence: 0.80
- Store timestamps as ISO 8601 text or Unix epoch integers consistently, and pick one convention per database. Confidence: 0.85
- Use `INTEGER PRIMARY KEY` for row ids unless you need globally unique ids, then add a separate UUID or ULID column. Confidence: 0.75
- Batch many inserts inside one transaction; thousands of autocommit inserts are slow. Confidence: 0.95
- Check query plans with `EXPLAIN QUERY PLAN` and add covering indexes for hot queries. Confidence: 0.85
- Run `PRAGMA optimize` periodically or on connection close so the planner has fresh statistics. Confidence: 0.70
- Track the schema version with `PRAGMA user_version` and run numbered migrations at startup. Confidence: 0.80
- Remember that many `ALTER TABLE` changes need the create-copy-drop-rename pattern, and wrap it in a transaction. Confidence: 0.80
- Back up with the online backup API, `VACUUM INTO` or Litestream, never by copying the file while it is being written. Confidence: 0.95
- Use FTS5 for full-text search and JSON functions for semi-structured columns before adding another service. Confidence: 0.75
- Keep the database file on local disk, never on a network file system where locking is unreliable. Confidence: 0.90
- Use an in-memory or temporary-file database per test for fast, isolated test runs. Confidence: 0.85
- Run `PRAGMA integrity_check` in a scheduled job and alert on anything other than `ok`. Confidence: 0.65

Written by the prompts.chat (CC0 prompt collection) community (f). Not tested by InnerVault.

How to get it

Setup steps: not applicable.

Related

  1. You are a senior database engineer and SQL architect with deep expertise in query optimisation, execution planning, indexing strategies, schema design, and SQL security across MySQL, PostgreSQL, SQL Server, SQLite, and…

    Indexed sivasaiyadav8143 · via prompts.chat (CC0 prompt collection) CC0-1.0

  2. a lot of people even professional said a software product or platfrom especially which has complex rules which was fully coded by AI by a vibe coder who deosnt understand what is the arcture concept deployed, read and…

    Indexed hussen.sepa@gmail.com · via prompts.chat (CC0 prompt collection) CC0-1.0

  3. code-hacker

    Prompts

    Code Hacker - VS Code Custom Agent + Web + TUI

    Stale hackerlibs · via GitHub 55 ★MITUpdated 20 days ago

    Source for code-hacker (opens github.com) git clone https://github.com/hackerlibs/code-hacker.git
  4. builder prompts which can be sent to builders like cursor, bolt.diy, bolt.new, trae, project idx, Claude code, lovable.dev, llmacoder, geminicoder, windsurf, deepseek-artifact, cline, aider etc

    Stale KingLeoJr · via GitHub 278 ★MITUpdated 2 months ago

    Source for awesome-vibe-coding-prompt-code-templates (opens github.com) git clone https://github.com/KingLeoJr/awesome-vibe-coding-prompt-code-templates.git
  5. Imagine you are an experienced Ethereum developer tasked with creating a smart contract for a blockchain messenger. The objective is to save messages on the blockchain, making them readable (public) to everyone…

    Indexed ameya-2003 · via prompts.chat (CC0 prompt collection) 177.9k ★CC0-1.0

  6. Manim Code

    Prompts

    Your task to create a manim code that will explain the chain rule in easy way

    Indexed industry5designers@gmail.com · via prompts.chat (CC0 prompt collection) CC0-1.0