1

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.

Paulos
  • 119
  • 1
  • 7
  • Maybe a duplicate question : https://stackoverflow.com/questions/16459990/sql-error-0-sqlstate-08s01-communications-link-failure – Shim-Sao Dec 20 '18 at 10:57
  • Hi. I already tried those solutions, unfortunately without success. Since that question didn't refer the Windows Service crash, nor the dataset size, I asked a new one. – Paulos Dec 20 '18 at 11:03
  • I don't have a response but for me it's a memory or buffer size problem somewhere. – Shim-Sao Dec 20 '18 at 11:09
  • 1
    Can you see the error log ? – farbiondriven Dec 20 '18 at 11:21
  • I'm not a heavy user of DataGrip, but the only logs I can see are the event and database logs. They both return simple errors like `10:37 Connected | 11:08 Connection to database_name failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.` The event only says that the table edit (first query) was successful. – Paulos Dec 20 '18 at 12:34
  • When trying directly from the terminal: `ERROR 2013 (HY000): Lost connection to MySQL server during query` – Paulos Dec 20 '18 at 12:57

0 Answers0