I personally want to have an SQLite as my default database, as I have a few friends’ websites that have extremely low traffic. There’s no need to have MySQL installed for such a small website that contains basic information.
No, SQLite can handle high volume of traffic as well and those who don’t believe me, go check How I built Remote | OK and launched it to #1 on Product Hunt
But that is not the point here.
We really need to have more alternatives to MySQL / MariaDB / Persona.
Thanks to PDO, we could have MS-Server, PostgreSQL, SQLite, Oracle…but we really need to support only the three most used: SQLite, MySQL, and PostgreSQL.
Read-only archive : https://petitions.classicpress.net/posts/94/add-pdo-support
Author : stefanos82
Vote count : 13
Status : open
Tags :
Comments
I am all for this, but it would have to be an opt-in, advanced feature at first. I bet almost every popular or non-trivial plugin would break in some way if we made a fundamental change to the DB layer.
~ posted by James Nylen
I know this is something a lot of people want, but I question if it would actually be workable long term or just a lot of good effort wasted?
I look at Drupal’s support for multiple databases, but as far as I know few people use it with anything by MySQL (or compatible, e.g. MariaDB) because most (all?) Drupal modules are written to work with MySQL and not other databases.
And there are a lot more WordPress plugins than there are Drupal modules. So the intertia would always be pulling for MySQL-ish and against everything else.
#fwiw #jmtcw
~ posted by Mike Schinkel
I also do not think that a DB engine compatibility is a pressing issue, but standardization always have benefits and the more you can nudge people into the direction of writing good and secure SQL the better.
PDO forces you to use properly prepared statements and have support for transactions. You can do both directly with the mysqli driver but this I guess might require almost the same amount of effort as moving to PDO.
Maybe what is needed as first step is to support proper prepared statements in WPDB, maybe as separate API, and than start to move isolated requests to a proper prepared statements model.
~ posted by Mark Kaplun
I’ve long wanted to use PostgreSQL as the backing datastore for WordPress. This would make that a possibility.
I imagine it’s possible to get this implemented as an optional interface that lives alongside the existing interface. If people choose a different backing datastore, then they should be technically savvy enough to realize that many plugins will break if they do, and they should make that choice themselves.
~ posted by Ben Overmyer
SQLite is ok with high traffic, but not with concurrent write locks, which is a basic problem with things like PHP-FPM.
As much as I’d love to see a DAL (database abstraction layer) in WordPress, this is a very hard topic.
~ posted by Peter Molnar
ezSQL (the library that WPDB is based on) offers drivers for MSSQL, SQLite, PostgreSQL and PDO. One of the original goals of the library was to abstract away from a single data store.
That said, WP abandoned multi-engine support a long time ago, because the only way to run even slightly performant DB queries is to make use of engine-specific optimizations. Trying to rewrite CP to use only the limited subset of SQL that is supported by all DB engines is gonna be pretty close to impossible.
~ posted by Greg Schoppe
viktor
June 24, 2022, 10:09pm
4
I think Greg’s comment sums it up well. Plus, this is a large project with no real value at this time.
1 Like
viktor
Closed
June 27, 2022, 10:09pm
5
This topic was automatically closed after 3 days. New replies are no longer allowed.