what is the best database for this type of use?
How to fix MySQL uuid repeat with slave server?
If MySQL show MySQL uuid repeat with slave server, how we can fix this problem?
Can anyone please help me with the steps?
If I turn it on again, do I need to do anything to sync the BINLOG?
Do i need to have partition key in every update delete or select?
Hey guys, may I ask you a very simple question?
its a lot of data and a lot of request
what is the best database for this type of use?
im using psql for now
should i change it?
Postgres is fine for that if you know how to use it correct
im using sql alchemy
No matter which ORM you like more
so what do you mean if you know how to use it correct
I mean the structure of you database. Tables, columns, their relations and indexes
Describe your problems in details
I want to upgrade MySQL 5.7.31 to 5.7.36 on windows
Can anyone please help me with the steps?
send your table DDL and the query,
You can’t optimize a query without the query
It seems there is no any specific requirements.
I can only say you should have some field in each record by value of which the record can be prescribed to one or another partition, uniquely
I can only say you should have some field in each record by value of which the record can be prescribed to one or another partition, uniquely
Do i need to have partition key in every update delete or select?
AFAIR no, this will only determine if it is going to be one partition operation or all partitions.
You can’t optimize a query without the query
send text please, I can’t see a thing

hi can anyone help me to solve this problem

Erd is as above
mysql> show create table tbl_campdataG
***** 1. row *****
Table: tbl_campdata
Create Table: CREATE TABLE tbl_campdata (
id int(11) NOT NULL AUTO_INCREMENT,
msisdn varchar(20) DEFAULT NULL,
entrydate datetime NOT NULL,
campid int(11) DEFAULT NULL,
status int(11) DEFAULT NULL,
lastupdatedate datetime DEFAULT NULL,
callerid varchar(20) DEFAULT NULL,
sms_template_answer varchar(500) DEFAULT NULL,
sms_template_answer_keypressed varchar(500) DEFAULT NULL,
sms_template_answer_keypressed_2 varchar(500) DEFAULT NULL,
sms_template_noanswer varchar(500) DEFAULT NULL,
priority int(11) DEFAULT ‘1’,
PRIMARY KEY (id,entrydate),
KEY indx_campid (campid),
KEY entrydate (entrydate),
KEY indx_msisdn (msisdn),
KEY indx_status (status),
KEY test_id (id)
) ENGINE=InnoDB AUTO_INCREMENT=130791169 DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (day(entrydate))
PARTITIONS 31 */
1 row in set (0.00 sec)
mysql>
mysql> select count(1) FROM tbl_campdata nolock WHERE DATE(entrydate) < DATE(DATE_ADD(NOW(),INTERVAL -15 DAY));
+———-+
| count(1) |
+———-+
| 5925646 |
+———-+
1 row in set (2.32 sec)
***** 1. row *****
Table: tbl_campdata
Create Table: CREATE TABLE tbl_campdata (
id int(11) NOT NULL AUTO_INCREMENT,
msisdn varchar(20) DEFAULT NULL,
entrydate datetime NOT NULL,
campid int(11) DEFAULT NULL,
status int(11) DEFAULT NULL,
lastupdatedate datetime DEFAULT NULL,
callerid varchar(20) DEFAULT NULL,
sms_template_answer varchar(500) DEFAULT NULL,
sms_template_answer_keypressed varchar(500) DEFAULT NULL,
sms_template_answer_keypressed_2 varchar(500) DEFAULT NULL,
sms_template_noanswer varchar(500) DEFAULT NULL,
priority int(11) DEFAULT ‘1’,
PRIMARY KEY (id,entrydate),
KEY indx_campid (campid),
KEY entrydate (entrydate),
KEY indx_msisdn (msisdn),
KEY indx_status (status),
KEY test_id (id)
) ENGINE=InnoDB AUTO_INCREMENT=130791169 DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (day(entrydate))
PARTITIONS 31 */
1 row in set (0.00 sec)
mysql>
mysql> select count(1) FROM tbl_campdata nolock WHERE DATE(entrydate) < DATE(DATE_ADD(NOW(),INTERVAL -15 DAY));
+———-+
| count(1) |
+———-+
| 5925646 |
+———-+
1 row in set (2.32 sec)
Function is used inside the where clause. Hence this is slow. The query has to first cast all of the values in the entrydate column to date and then do the comparison.
Yes, I agree