Answer the question
In order to leave comments, you need to log in
Choose a DBMS between MySQL, PostgreSQL, MariaDB and MSSQL?
Good afternoon! I am developing a SaaS application , and now I have a choice of a DBMS for storing basic data. I started development on MySQL, but now I'm not sure which one to choose. Moving to another DBMS at this stage will not be a problem for me (I use PDO). far from a clear understanding of what “high loads” are for a DBMS. It's just that according to my calculations, in about a year the database will be very weighty (see below).
The main choice is between MySQL, PostgreSQL, MariaDB. Also, it is possible, but not welcome, the option of Microsoft SQL Server on Windows Azure
The situation is as follows:
CREATE TABLE IF NOT EXISTS `clients` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`personalID` int(11) NOT NULL,
`ownerID` int(11) NOT NULL,
`fromID` int(11) NOT NULL DEFAULT '4',
`fromDomain` varchar(255) NOT NULL,
`datetime` datetime NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`paid` tinyint(1) NOT NULL DEFAULT '0',
`paymentType` tinyint(4) NOT NULL DEFAULT '1',
`wmSum` float NOT NULL DEFAULT '0',
`wmCommission` float NOT NULL DEFAULT '20',
`sysNumber` varchar(14) NOT NULL,
`sysNumberLastUpdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`sysNumberStatus` varchar(250) NOT NULL,
`timezone` float NOT NULL,
`comment` varchar(500) NOT NULL,
`countryID` int(11) NOT NULL,
`postIndex` varchar(6) NOT NULL,
`region` varchar(500) NOT NULL,
`city` varchar(500) NOT NULL,
`address` varchar(500) NOT NULL,
`fio` varchar(500) NOT NULL,
`phone` varchar(15) NOT NULL,
`email` varchar(255) NOT NULL,
`price` float NOT NULL,
`quantity` int(11) NOT NULL DEFAULT '1',
`label` varchar(30) NOT NULL,
`tag` int(11) NOT NULL,
`ip` varchar(15) NOT NULL,
`referer` varchar(200) NOT NULL,
PRIMARY KEY (`id`),
KEY `from` (`ownerID`,`fromID`),
KEY `paid` (`paid`),
KEY `status` (`status`),
KEY `label` (`label`),
KEY `sysNumberLastUpdate` (`sysNumberLastUpdate`),
KEY `personalID` (`ownerID`,`personalID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Answer the question
In order to leave comments, you need to log in
It looks like you forgot to consider this option: Percona Server is an enhanced, drop-in MySQL replacement . For very fast query execution, you need to use a special NoSQL interface called HandlerSocket. Yes, and even multi-master replication is also there.
Somewhat confuses PDO and the desire to make a loaded site. I'm afraid that this layer will have to be abandoned immediately.
Sharding and replicating Postgre is easier and more reliable. But even with PDO, there are some differences in syntax and features between it and MySQL.
The main thing - do not plunge into MSSQL. You can work with it normally only inside the stack of MS-tools. It doesn't even support UTF-8. Well, MS puts a bolt on non-Windows drivers, they release them very rarely.
Choose what you know best!
If MySQL, then consider MariaDB or Percona. Yes, and you can move to them from MySQL at any time, as they are backwards compatible.
Judging by your data, the issue of load when taking into account straight arms will arise before you in two or three years. And premature optimization can ruin the project.
And try to avoid JOINs as much as possible. As a rule, most of the problems arise because of them.
There is about MySQL, MariaDB and PostgreSQL. I hope that at least partially answers your question eax.me/postgresql-vs-mysql/
Based on the requirement of reliability, I would choose PostgreSQL. All other operations are typical for a DBMS and, with the right settings, will not create a headache.
Why not look at MongoDB?
This is certainly not an ACID database, but horizontal scaling / sharding is much easier to do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question