0

my db is growing everyday by several tens of GB. because of this, it was decided to move several tables to another server. the speed of work is extremely critical.

1 - how to make it so that one of the databases can connect to a table from another database. I need the code directly, I can't find it.

2 - make a database on server 1 so that when making a request to the product_log table, if necessary, the database itself makes a request to the desired server. server 1 db 1 product_log table (september) server 2 db 1 product_log table (october) server 2 db 1 product_log table (november)

  • *it was decided to move several tables to another server. the speed of work is extremely critical.* These are contradictory statements. – Akina Sep 05 '22 at 06:54
  • #1. Study FEDERATED Engine. https://dev.mysql.com/doc/refman/8.0/en/federated-storage-engine.html #2. *if necessary, the database itself makes a request to the desired server* No, you must do this in SQL code explicitly. – Akina Sep 05 '22 at 06:56
  • what do you want to tell me that Google stores everything on one server? on the same disk? humorst – Александр Коваленко Sep 05 '22 at 06:57
  • *server 1 db 1 product_log table (september) server 2 db 1 product_log table (october) server 2 db 1 product_log table (november)* A table per month - bad architecture. Study partitioning. https://dev.mysql.com/doc/refman/8.0/en/partitioning.html – Akina Sep 05 '22 at 06:57
  • ```A table per month - bad architecture``` and what are the arguments that this is a bad idea? – Александр Коваленко Sep 05 '22 at 07:00
  • This contradicts normal forms. – Akina Sep 05 '22 at 07:01
  • *what do you want to tell me that Google stores everything on one server? on the same disk? humorst* Do you really think that Google uses MySQL? and even some other relational DBMS? Humorist... – Akina Sep 05 '22 at 07:02
  • ```In MySQL 8.0, it is also possible to use a DATE or DATETIME column as the partitioning column using RANGE COLUMNS and LIST COLUMNS partitioning.``` from your own link about portioning – Александр Коваленко Sep 05 '22 at 07:08
  • I don't understand what you want to tell me by quoting this fragment. – Akina Sep 05 '22 at 08:39
  • Please clarify what "another server" means? Is it another _physical server_ or just another MySQL _database server_ in the same _physical server unit?_ Why "the speed of work is extremely critical"? What is the impact if it's not? – FanoFN Sep 05 '22 at 09:22
  • two physical server with two mysql server. – Александр Коваленко Sep 14 '22 at 06:23

0 Answers0