mysqli - Multiple MySQL access blocked using PHP but not MySQL locked -
i have upload location users can update portion of database uploaded file. files 9gb, inserting 150,000,000 lines can take few minutes.
after clicking button on website update database, php (using mysqli) goes on mysql lock down. if open other tabs, nothing until large update complete. however, know it's not locking database/table, because cli can still "select count(*) table" , gives me result right away.
what best method of inserting 150,000,000 records while still letting other php pages access db (for reading only)?
you can use "insert delayed". delayed option insert statement mysql extension standard sql useful if have clients cannot or need not wait insert complete. common situation when use mysql logging , periodically run select , update statements take long time complete.
you can read resource on official documentation here.
;-)
Comments
Post a Comment