Postgres support


OpenEMR uses MySQL as database. have you guys thought support Postgres instead? Postgres ( ) is the world’s best open source database and having competitive feature like Oracle. I’m willing help migrating from database side, if anyone interested working with me on PHP side.

There have been conversations about this in the past. It’s mostly an issue of someone doing the work. We’re also working on modernizing our SQL codebase and I think the use of an ORM would be required for this. @MatthewVita has introduced some Doctrine stuff into the codebase. This would be the way to go if we wanted to support Postgres.

I don’t think there’s any interest in replacing MySQL/MariaDB, but expanding and offering Postgres support is definitely an option!

Postgres is a very nice database, but so is MySQL. A recent poster in our chat mentioned that using PG will speed up OpenEMR. I think that a better investment would be adding more indexes and specific FK relationships in OpenEMR’s schema.

If this or Doctrine interest you, please let me know!


Thanks for quick responses, @robert.down & @MatthewVita

I agree with you on keeping MySQL supported and add support on Postgres. Moving to Doctrine makes sense to me. On the other hand, I’m open to help improve performance on current MySQL schema. I’m new to this project so i’m not sure how to get started!

I have used Postgres and MySQL extensively so let me know if you need any help with schema design, performance and/or any devops and/or maintenance process related processes improvements.

1 Like

Would you be interested in testing Amazon Aurora’s version of MySQL?

yeah. I’m interested. I don’t want to reinvent the wheel here… do we have documentation on testing methodology and environment to test?

No documentation, but you can possibly work with @JBW as he is in the process of documenting the most important tables in OpenEMR in terms of big data

Also, for what it’s worth, here’s the 3 work items we discussed, listed in terms of priority:

  1. Adding indexes and proper FKs to OpenEMR MySQL
  2. Testing out Aurora MySQL on AWS
  3. Doctrine work

I’d say indexes and foreign keys are most i,port at followed by Doctrine

1 Like

Yeah, this list was hard to order. Most important is indexes / FKs for sure. Doctrine is probably #2.

I will start working on reviewing indices and foreign keys then.

1 Like

Awesome. As I said, you’ll want to get to know @JBW because he has been deep into the tables and (I believe) is documenting the major ones for big data purposes.