SQLite in development, PostgreSQL in production—why not?

前端 未结 3 1897
长情又很酷
长情又很酷 2020-12-16 01:57

Heroku advises against this because of possible issues. I\'m an SQL noob, can you explain the type of issues that could be encountered by using different databases?

3条回答
  •  误落风尘
    2020-12-16 02:39

    I was in a (kind of) similar situation. Generally it is a very bad idea to use different database engines for production and test. There are multiple reasons

    • SQL syntax differences including DML, DDL statements, stored procedures, triggers etc
    • Performance optimizations done on one DB wont be valid on the other
    • SQLite is an embedded database, PostgreSQL is not
    • They don't support the same data types
    • Different syntax/commands to configure/setup db. SQLite uses PRAGMAs

    One should stick to one db engine, unless you have a really, really good reason. I can't think of any.

提交回复
热议问题