![]() | 8165259 | magento2 | Query | Waiting for table metadata lock | INSERT IGNORE INTO `temp_28d513e50adac3dd498f9d4087f648cf73ad8e9d` SELECT `e`.`entity_id` FROM `cata | | 8165261 | magento2 | Query | Waiting for table metadata lock | INSERT IGNORE INTO `temp_dd977f7939670fc3eb19c6b5c89be77b8bba52b1` SELECT `e`.`entity_id` FROM `cata | | 8165217 | magento2 | Query | Waiting for table metadata lock | INSERT IGNORE INTO `temp_da8bbd709684db07102be86caeae8712790bb37e` SELECT `e`.`entity_id` FROM `cata | | 8165260 | magento2 | Query | Waiting for table metadata lock | INSERT IGNORE INTO `temp_18b43873915bfb0015033be4ee261cae3e897dee` SELECT `e`.`entity_id` FROM `cata | | 8165288 | magento2 | Query | Waiting for table metadata lock | INSERT IGNORE INTO `temp_abca7e583ce39ed454be82b78bdc29b389a4ee74` SELECT `e`.`entity_id` FROM `cata | | id | db | command | state | left(info,100) | Here is a list of the processes in MySQL during such a deadlock situation (occurs while running the reindex process): mysql> select id, db,command, state, left(info,100) from information_schema.processlist ![]() The insert query is still running and other queries wating for table locks - until I kill the query in MySQL. This brings the whole site down, as no query will ever finish, causing timeout errors on the web frontend.Įven after killing the reindexing process, the situation is not changed. This causes other queries to hang, because they are waiting for table locks for tables the insert is reading. These queries should be very fast, however, some keep running indefinitely. During the magento reindex process (a PHP process that transforms data into various tables for faster retrieval), some temporary tables are created and filled. Tip: The SELECT INTO statement can also be used to create a new, empty table using the schema of another.I have a MySQL 5.7.30 as storage for a Magento 2 shop. ![]() Use the IN clause to copy the table into another database: SELECT *Ĭopy only a few columns into the new table: SELECT User_Name, User_ContactĬopy only the American customers into the new table: SELECT *Ĭopy data from more than one table into the new table: SELECT Users.User_Name, Orders.Order_ID You can apply new names using the AS clause.Ĭreate a backup copy of Customers: SELECT * The new table will be created with the column-names and types as defined in the SELECT statement. The SELECT INTO statement copies data from one table and inserts it into a new table. The SELECT INTO statement selects data from one table and inserts it into a new table.Ĭopy all columns into new table in same database: SELECT *Ĭopy all columns into new table in different database: SELECT *Ĭopy only the columns we want into the new table in same database: SELECT column_name1,column_name2.įROM table_name SELECT column_name1,column_name2. This helps you create temporary tables quickly. You can easily copy data into new table in MySQL using SELECT INTO.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |