DEV Community

John Mitchell
John Mitchell

Posted on

Re: using Sqlite for Dev and Postgres for Production

Using Sqlite locally, Postgres in production. New feature is slow -- will this persist in production, or is it a Sqlite thing?

-- Reddit /r/django thread

The slowness will almost definitely persist when deploying to Postgres. Use a tool to measure performance. Two million objects is no big deal.

Consider switching to Postgres on local development. Any "drift" between production and local is a risk. We did the "sqlite for dev, Postgres for prod" thing and sometimes bugs would only appear in production, which made them much harder to track down. Sqlite has loose flexible typing. This can be disabled, if you want to keep Sqlite local. This will mitigate the risk somewhat and it's an easy change.

Other people on Reddit are like "Sqlite is a toy", I strongly disagree. It's 10x faster than Postgres - with limitations - and usable for 90% of use cases. The fact you're using two different databases for dev and prod is a risk, but not critical.

Source: I'm a Dev/DevOps consultant.

AWS Q Developer image

Your AI Code Assistant

Implement features, document your code, or refactor your projects.
Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay