I have a table with ~150M rows and 3 columns. Currently testing DataGrip. I want to separate a string on the first column into two new columns, for instance:
Test/out
should be separated into Test
and Out
I'm currently using the following queries:
ALTER TABLE dataset ADD COLUMN id TEXT;
UPDATE dataset SET id = SUBSTR(id_type, 1, INSTR(id_type, '/') - 1);
ALTER TABLE dataset ADD COLUMN type TEXT;
UPDATE dataaset SET type = SUBSTR(id_type, INSTR(id_type, '/') + 1, LENGTH(id_type));
While using a limit, the script works. However, when I try to proccess the whole set, I get the following error, after some minutes:
[08S01] Communications link failure
The last packet successfully received from the server was 551,753 milliseconds ago. The last packet sent successfully to the server was 551,753 milliseconds ago.
java.net.SocketException: Connection reset
The Windows Service (MySQL80) stops, and I need to restart it manually.
Already tried to:
- Update the J/Connector to the latest version
- Change some timeouts (connect_timeout, wait_timeout, interactive_timeout)
- Cheking my.conf and changing bind address
When I tried to run that script on a SQLite copy of the db, the process went ok. Tried to follow a lot of similar threads, but none of those worked.