Switch from SQLite to PostgreSQL

So many issues with SQLite and high volumes of data. It crashes so many times. We need PostgreSQL. Please.

Postgres, MySQL, MariaDB…just something.

At the least, give us an option to set the cache_size in sqlite within Plex! I have over 20k files in Plex (video files, I’ve removed my audio library because performance reasons), and I can often see slowness during loading of the web client, or other clients. I’ve manually set the default_cache_size in my sqlite file, but this is a deprecated feature. Need to have the ability to set cache_size from within Plex to something higher than the default 2000 (which is ~2MB).

Better solution would be the OPTION to use an external database, which can also open the door to highly available environments, which are features important to those of us who run plex at scale.

1 Like

something, anything.

make plex database agnostic and work any standard sql database (local or remote).

TBH Switching from SQLite to anything else is not as easy as said. :slight_smile:

The reason why sqlite is so much used is that doesn’t need an external dependencies, no extra daemon running only internal libraries dependencies and one file.

With that i’m not saying that I wouldn’t like see Plex using another db engine, but it’s unlikely to happen.

And if it does I’d actually go for a documental db, like solr/elastic which i think it’s more fitting as data store than a relational db in Plex usecase. But again that alone would be a massive change…

It’s not that hard. If Plex would have been open-source I’d have forked it and done it myself.

4 Likes

Seems ridiculous to suggest that the support for other data storages is a hard task to implement, for sure it requires some work time, but the benefits that it brings are a lot. At least enough to get a response from some Plex team member that seems to ignore questions about this. I don’t think Plex could never be scaled as a modern software while they have sqlite as its only storage option, and I see this as a requirement to be the reference as home media server.

1 Like

I’d love to see them implement an ODBC compliant client for local or remote databases, with the default being the local SQLite since most people don’t need or want to mess with a database for their media server, but having the option there for those of us who would like it would be very helpful.

I honestly think Plex would go FOSS before they did something like this but still, it’s worth asking for.

2 Likes

At the very least me too would like to have an advanced option for this somehow, somewhere. Just giving the SQL DB a bit more juice to work with can work wonders on larger systems and setups.

1 Like

Glad to see more traction here. My libraries have grown to over 28k files as of today (compared to ~20k Jan 2019), which I’m sure has an impact on my SQLite DB. I’ve maintained my default_cache_size to be larger than my page_count, and it’s definitely been helpful. My page_count is ~56,000 as of today, so I have my cache_size set to 64,000.

I still maintain that it would be nice if Plex had an advanced option to set that cache_size from the application so I didn’t have to manage it, or at least a tick box that would set my cache_size to a size larger than page_count if I wanted (do a check on daemon restart to check and set this if needed maybe?). Even if this was a hidden option that I’d have to set Preferences.xml or something…

4 Likes

I really think we need more momentum here. Even Chuck said it himself, that when talking to the database designer, sqlite was never expected to hold as much data as many of us have. Especially once we started adding large music libraries. We need more upvotes on this.

Previously from Chuck:

I previously chatted with the actual designer of the database. When I told him the sizes involved, he flat out sold me that ā€œbad things will happenā€. I take that to mean that the typical home user , which is what Plex is designed for, was never expected to have that much media.

I don’t think we’re ever going to get this.

Hate to say it but the database designer is not all that familiar with 3NF. The database has bigger problems than the engine.

1 Like

I tried a variety of media servers, as if only kodi can support external database, but I can’t scan the media library correctly, so I gave it up. I m currently using jellyfin, beautiful interface and multiple platform support, almost perfect, but also only use sqlite, it’s a bit slow when processing pictures and music files, if you can add jellyfin external database interface, many people will be grateful, including me!!! :smiling_face_with_three_hearts:

PostgreSQL isnt my favorite, however I will take anything as an alternative to SQLite!

There is already a feature request for this. Better to add your vote there than to split votes across multiple threads.

1 Like

A request for the same feature exists already, and it has more votes.

Therefore this one is closed, to prevent spreading the votes across several threads, even though they vote for the same (or at least very similar thing).

Votes are given back to the users who voted on this request. Please think of re-voting in the other thread if you still want it.


Rules for the Feature Suggestions forum section:

  • Please search before creating a new suggestion thread.
  • Only one feature per thread.

See existing feature suggestions, sorted by most popular first
https://forums.plex.tv/c/general/feature-suggestions/l/votes

1 Like