A fair comparison of database query latencies across database providers and ORM libraries in the Node.js & TypeScript ecosystem.
Read more about our methodology and result analysisWe have collected the data by running equivalent queries of all ORMs on real-world infrastructure. The table below shows the median values of 500 benchmark iterations that we have executed for each ORM library.
Prisma | Drizzle | TypeORM | |
---|---|---|---|
Find all Return all records | 8.00ms | 23.09ms | 5.24ms |
Query | |||
Analysis | 0msIQR The Interquartile Range (IQR) is a statistical measure to describe the distribution of a dataset that's robust against outliers. In this case, the dataset represents the latencies that have been measured across 500 benchmark runs for the Find allquery using Prisma ORM. A low value indicates that there is less spread in the middle portion of the data. 0msStd Dev The Standard Deviation is a statistical measure to describe the distribution of a dataset that's affected by outliers. In this case, the dataset represents the latencies that have been measured across 500 benchmark runs for the Find all query using Prisma ORM. A low value means that most of the data points are close to the mean. This indicates that there is less overall spread in the data. | 1msIQR The Interquartile Range (IQR) is a statistical measure to describe the distribution of a dataset that's robust against outliers. In this case, the dataset represents the latencies that have been measured across 500 benchmark runs for the Find allquery using Prisma ORM. A low value indicates that there is less spread in the middle portion of the data. 6msStd Dev The Standard Deviation is a statistical measure to describe the distribution of a dataset that's affected by outliers. In this case, the dataset represents the latencies that have been measured across 500 benchmark runs for the Find all query using Prisma ORM. A low value means that most of the data points are close to the mean. This indicates that there is less overall spread in the data. | 0msIQR The Interquartile Range (IQR) is a statistical measure to describe the distribution of a dataset that's robust against outliers. In this case, the dataset represents the latencies that have been measured across 500 benchmark runs for the Find allquery using Prisma ORM. A low value indicates that there is less spread in the middle portion of the data. 1msStd Dev The Standard Deviation is a statistical measure to describe the distribution of a dataset that's affected by outliers. In this case, the dataset represents the latencies that have been measured across 500 benchmark runs for the Find all query using Prisma ORM. A low value means that most of the data points are close to the mean. This indicates that there is less overall spread in the data. |
Histogram Higher bars on the left are better because they indicate that more iterations had low latencies. | |||
Filter, paginate & sort Return a filtered, sorted and paginated list of records | 2.20ms | 1.91ms | 1.61ms |
Nested find all Return all records with a relation | 65.27ms | 1354.03ms | 58.33ms |
Find first Return the first record | 1.72ms | 1.56ms | 1.06ms |
Nested find first Return the first record with a relation | 4.21ms | 3.20ms | 4.72ms |
Find unique Return a record that's identified by its primary key | 1.35ms | 1.27ms | 0.73ms |
Nested find unique | 3.49ms | 3.02ms | 4.36ms |
Create Create a new record | 2.30ms | 2.25ms | 2.91ms |
Nested create Create two records that are related via a foreign key in a single query | 7.90ms | 6.11ms | 4.78ms |
Update Update an existing record | 2.11ms | 1.94ms | 1.56ms |
Nested update Update two records that are related via a foreign key in a single query | 5.22ms | 4.08ms | 3.27ms |
Upsert Update an existing record or create a new one if it doesn't exist | 4.41ms | 1.91ms | 3.19ms |
Nested upsert | 4.57ms | 4.04ms | 3.96ms |
Delete Delete an existing record | 4.60ms | 4.08ms | 4.10ms |