681 B

Milk Sad Lookup

Insert many rows of sha256 hashes into a Postgres database.

  1. Install postgress-client:
sudo apt install postgres-client
  1. Install Docker
  2. Install Python dependencies:
pip install psycopg2
  1. Run the database via Docker:
  1. Configure the database:
  • Log into psql shell:
psql -h localhost -p 5432 -U postgres

Password: test

  • Create Database, table, and index:
postgres=# CREATE DATABASE hashes;
postgres=# \c hashes;
hashes=# CREATE TABLE hashes(id BYTEA);
hashes=# CREATE INDEX hashes_id on hashes(id);
  1. Hammer time: