{"id":25287623,"url":"https://github.com/azmainadel/prisma-v-drizzle-pg-benchmark","last_synced_at":"2026-05-02T05:03:36.282Z","repository":{"id":221184672,"uuid":"753445599","full_name":"azmainadel/prisma-v-drizzle-pg-benchmark","owner":"azmainadel","description":"PostgreSQL test dataset query benchmark using Prisma and Drizzle ORMs.","archived":false,"fork":false,"pushed_at":"2024-02-06T14:43:50.000Z","size":178,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T17:15:19.652Z","etag":null,"topics":["benchmark","drizzle-orm","postgresql","prisma-orm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azmainadel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-06T06:10:37.000Z","updated_at":"2024-05-07T10:04:31.000Z","dependencies_parsed_at":"2024-02-06T16:57:05.862Z","dependency_job_id":null,"html_url":"https://github.com/azmainadel/prisma-v-drizzle-pg-benchmark","commit_stats":null,"previous_names":["azmainadel/prisma-v-drizzle-pg-benchmark"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/azmainadel/prisma-v-drizzle-pg-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azmainadel%2Fprisma-v-drizzle-pg-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azmainadel%2Fprisma-v-drizzle-pg-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azmainadel%2Fprisma-v-drizzle-pg-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azmainadel%2Fprisma-v-drizzle-pg-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azmainadel","download_url":"https://codeload.github.com/azmainadel/prisma-v-drizzle-pg-benchmark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azmainadel%2Fprisma-v-drizzle-pg-benchmark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262407319,"owners_count":23306350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","drizzle-orm","postgresql","prisma-orm","typescript"],"created_at":"2025-02-12T22:51:02.266Z","updated_at":"2026-05-02T05:03:31.258Z","avatar_url":"https://github.com/azmainadel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Prisma v Drizzle Benchmark on a PostgreSQL DB\nPostgreSQL test dataset benchmark using Prisma and Drizzle ORMs.\n\n## Setting up\n1. Make sure *Node, pnpm, Docker* are installed.\n2. Use the correct node version as per the `.nvmrc` file. \n```bash\nnvm use\n```\n3. Install the required dependencies. `pnmp` recommended.\n```\npnpm install\n```\n4. Make sure your SQL data files are properly formatted. Use the `script` folder files if you need to modify anything.\n\n\n## How to run\nMake sure you have Docker running.\n\n```bash\npnpm run start\n```\n\n## Sample run results on my machine\n```text\ncpu: Apple M2 Pro\nruntime: node v20.8.0 (arm64-darwin)\n\nbenchmark      time (avg)             (min … max)       p75       p99      p999\n------------------------------------------------- -----------------------------\n• SELECT * FROM city\n------------------------------------------------- -----------------------------\ndrizzle     5,357 µs/iter   (4,301 µs … 6,745 µs)  5,895 µs  6,726 µs  6,745 µs\nprisma      16.39 ms/iter   (14.77 ms … 18.03 ms)   16.5 ms  18.03 ms  18.03 ms\n\nsummary for SELECT * FROM city\n  drizzle\n   3.06x faster than prisma\n\n• SELECT * FROM city WHERE id = ?\n------------------------------------------------- -----------------------------\ndrizzle        60 ns/iter   (54.42 ns … 152.2 ns)  58.39 ns  97.05 ns 112.35 ns\nprisma      60.73 ns/iter  (54.97 ns … 133.95 ns)  58.96 ns  99.28 ns 115.95 ns\n\nsummary for SELECT * FROM city WHERE id = ?\n  drizzle\n   1.01x faster than prisma\n\n• SELECT * FROM city WHERE countrycode ilike ?\n------------------------------------------------- -----------------------------\ndrizzle     62.86 ms/iter   (60.29 ms … 64.51 ms)  64.39 ms  64.51 ms  64.51 ms\nprisma     204.01 ms/iter (169.61 ms … 224.12 ms) 218.46 ms 224.12 ms 224.12 ms\n\nsummary for SELECT * FROM city WHERE countrycode ilike ?\n  drizzle\n   3.25x faster than prisma\n\n• \"SELECT * FROM country\"\n------------------------------------------------- -----------------------------\ndrizzle     1,903 µs/iter   (1,133 µs … 4,397 µs)  2,149 µs  3,491 µs  4,397 µs\nprisma      3,408 µs/iter   (2,909 µs … 4,384 µs)  3,550 µs  4,327 µs  4,384 µs\n\nsummary for \"SELECT * FROM country\"\n  drizzle\n   1.79x faster than prisma\n\n• SELECT * FROM country WHERE code = ?\n------------------------------------------------- -----------------------------\ndrizzle     13.81 ms/iter    (11.9 ms … 14.49 ms)  13.94 ms  14.49 ms  14.49 ms\nprisma      13.57 ms/iter   (12.58 ms … 17.73 ms)  13.56 ms  17.73 ms  17.73 ms\n\nsummary for SELECT * FROM country WHERE code = ?\n  prisma\n   1.02x faster than drizzle\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazmainadel%2Fprisma-v-drizzle-pg-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazmainadel%2Fprisma-v-drizzle-pg-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazmainadel%2Fprisma-v-drizzle-pg-benchmark/lists"}