if you have a sku table with 10w or more data, how can you quickly get inventory from the second database to update sku inventory data?
if you have a sku table with 10w or more data, how can you quickly get inventory from the second database to update sku inventory data?
if your library 2 does not have a sku table, you can use the mysqldump command to export the sku table in library 1 to a file, and then import the data from this file into library 2:
.$ mysqldump -uroot -proot --databases db1 --tables sku >/tmp/sku.sql
$ mysql -uroot -proot db2 < /tmp/sku.sql
if you have sku tables in Library 2, and you just want to update data in Library 1 that is not available in Library 2, you must first pass insert. To operate with select statements, it is important to note that it is best not to insert 10w data at once, but to separate them according to certain conditions, such as id, because there are certain restrictions within mysql:
INSERT INTO db2.sku
SELECT * FROM db1.sku
where
(db1.sku.id between 1 and 10000)
and (db2.sku);
INSERT INTO db2.sku
SELECT * FROM db1.sku
where
(db1.sku.id between 10001 and 20000)
and (db2.sku);
I hope I can help you.
how do you design database fields like youtube pages that show whether you have pressed like or dislike? And go to the database to judge when the user arrives at the page? whether the design idea is like this Post table id picroute likeusers dislik...
system Information php 7.1 MariaDB 10 Laravel 5.6 centos 7 when users place an order using the balance, they will have a series of table operations: 1, update the balance field of the user table 2, insert data 3 into the balance record table, c...
the price of the hotel made now will change on a certain date. The database structure looks like this. Ignoring most of the fields, room_type is the id, price of the room type is bound to him. < span> + () 3*4 + 1 <hr> <hr> <h...