,

Reasons to Reconsider Using Prisma for Your Project

Posted by

Why Prisma Might Not Be a Good Choice for Your Project

Why Prisma Might Not Be a Good Choice for Your Project

Prisma is a popular open-source database toolkit that simplifies database access for developers. However, it might not be the best choice for every project. Here are some reasons why Prisma may not be suitable for your needs:

1. Complexity

Prisma has a steep learning curve and can be complex to set up and integrate with your existing codebase. If you are working on a small project with simple database requirements, Prisma may be overkill and add unnecessary complexity to your code.

2. Performance

While Prisma offers a convenient way to interact with databases, some developers have reported performance issues when using it in production. If your project requires high performance and scalability, you may want to consider other database solutions.

3. Limited support for certain databases

Prisma works well with popular databases like PostgreSQL, MySQL, and SQLite. However, if your project requires support for less common or legacy databases, you may find that Prisma does not provide the necessary compatibility.

4. Lack of control

Prisma abstracts away much of the complexity of database management, which can be a double-edged sword. While it simplifies the development process, it also limits your control over the database and can make it difficult to optimize queries and fine-tune performance.

5. Dependencies and lock-in

Using Prisma means adding another dependency to your project, and relying on a specific set of tools and libraries. This can lead to lock-in and make it harder to switch to alternative solutions in the future.

These are just a few considerations to keep in mind when evaluating whether Prisma is the right choice for your project. While it offers many benefits, it may not be suitable for every use case. Before incorporating Prisma into your stack, be sure to thoroughly evaluate your project’s requirements and weigh the pros and cons of using this tool.

0 0 votes
Article Rating
42 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Sean (Source1)
11 months ago

Prisma's DX is great! But as someone who's been shipping Drizzle for just over a month and a half now, I don't think I can go back.
It doesn't even feel like an ORM, more like a lite wrapper around SQL.

Sam Hartmann
11 months ago

why not just use mongodb right away?

Char
11 months ago

I believe they added edge support

Omer Priel
11 months ago

For those who know SQL, sometimes clean SQL without ORM is better.
Write a library that will contain the queries with validation and verification of the parameters. and return them in present form (interface tuple class).
It's very efficient, it's intuitive, when you work correctly it's secure and it's easy to mock it for tests.

Anthony mann
11 months ago

I think its worth learning drizzle even for a biginner, especially givin how useful it is to have at least a basic idea of how to write SQL

samjad ps
11 months ago

Drizzle feel like laravel elequent

IiIiIiI
11 months ago

Prisma v5 is still f slow. I’ve started using Drizzle and it seems much faster than Prisma

Paschal Okafor
11 months ago

Please can someone explain to me what edge means?😢

Mahmoud Abd Al-Hadi
11 months ago

What about Typescript support?

Nikolas Burk
11 months ago

Hey Josh, thanks for another amazing and really informative video 😄 I work at Prisma and quickly want to react to a few of the things you've said in the video.

First, regarding Edge Support in Prisma. If you're using the plain ORM, this is indeed not possible right now. However:

– We are currently working on a solution to enable usage of Prisma ORM in Edge functions that will work even with the Rust-based query engine. We don't have a concrete timeline yet but expect some more news about this in the next few weeks/months 🎉
– It is still possible to use Prisma in Edge environments using Accelerate. Accelerate is an external connection pool (and also comes with an optional, global database cache) that you can use to proxy your DB connections from Edge functions. In fact, when deploying an application to the Edge, you'll want to use an external connection pool to ensure the scalability of your DB connections during traffic spikes. If you use Drizzle or another ORM without an external connection pool in Severless or Edge environments, you run the risk of exhausting your DB connections because each function instance will spawn a DB connection which in situations of high traffic will lead to the exhaustion of your DB connection limit. With an external connection pool, this problem is mitigated so using this external connection pool is the more sustainable architecture in the first place.

We love your content at Prisma and are looking forward to more videos 😄💚

TheGamingMaik
11 months ago

For JS BBF Projects with a DB that only connects to this one app/projects drizzle might excell. But I work in a Microservice, Schema first environment. I don't want to create a schema in every service, I want to do db-schema as a ssot.

And for anything that doesn't rely on performance as much like sync jobs, im-/exports and research I still prefer the ease of db pull and the overall DX.

I see that Drizzle has a big advantage by running on edge and it certainly is better for that specific usecase.

But generally I don't see why people call Prisma dying. I don't even consider them rivals…

Cecep Budiman
11 months ago

hmm i dont think those tradeof is good reason to switch prisma to drizzle, because if you are really need performance in prisma, you can do it by using the raw queries and it is also secure too not to mention their transactions api which is good, prisma also made you deploy faster because the easiness of prisma schema and the orm. and also serverless is suck on both things because the cold boot, have you seen amazon prime is switching to monolithics? so if you are just starting a small to medium projects and need to deploy fast use prisma. setting up db youself is so easy this day using dockers…. so you dont need to pay planetscale or aws or gcp shit

weilies chok
11 months ago

I am currently evaluating an architecture that work best for API, prisma sounds greate coz the API call could jz call directly backend by prisma and return result in JSON. But I don't see such feat in drizzle, which everything is in script instead of JSON. Correct me if I am wrong. Do recommend me if u know any package do that 😊 thanks pal

Sora Gaming
11 months ago

Sadly there's still no adapter for next-auth with drizzle 🙁

Shayan ali Jalbani
11 months ago

What about firebase

Jimmy
11 months ago

what about speed in terms of fetching compared to prisma?

J B
J B
11 months ago

Am I missing something?.. surely edge hosting for an ORM is irrelevant unless you are replicating multiple DBs, as your ORM regardless of choice still needs to make connections to a DB that's not on the edge.

james bonf
11 months ago

Honestly just learn squeel and use mysql2

iukeay
11 months ago

I am able to kinda run Prisma on the edge (total query, and network overhead around 93ms) server running on railway. Versel edge function same region.
They recently made some changes to fix the whole cold start issue with it also

Bo Opfer
11 months ago

dumb question, why exactly use an orm if u can write sql?

cause we want the code first approach?