2

I have This script by Helping @lukstorms ,

-- DROP TABLE IF EXISTS test_words;
CREATE TABLE IF NOT EXISTS test_words (
  id int unsigned NOT NULL PRIMARY KEY,
  words text NOT NULL
);

-- DROP TABLE IF EXISTS test_words_unfolded;
CREATE TABLE IF NOT EXISTS test_words_unfolded (
  word varchar(500) NOT NULL ,
  id int unsigned NOT NULL,
  KEY (word)
) row_format=dynamic;


-- DROP TABLE IF EXISTS test_wordlist;
CREATE TABLE IF NOT EXISTS test_wordlist (
  wordid serial primary key,
  word text NOT NULL
);

-- DROP TABLE IF EXISTS test_wordids;
CREATE TABLE IF NOT EXISTS test_wordids (
  id int unsigned NOT NULL,
  wordid int unsigned NOT NULL,
  idlist text,
  KEY (id),
  KEY (wordid)
);

-- DROP TABLE IF EXISTS test_result;
CREATE TABLE IF NOT EXISTS test_result (
  id int unsigned NOT NULL PRIMARY KEY,
  words text NOT NULL
);

-- DROP TABLE IF EXISTS test_nums;
CREATE TABLE IF NOT EXISTS test_nums (n int unsigned NOT NULL PRIMARY KEY);
TRUNCATE TABLE test_nums;
INSERT INTO test_nums (n) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),(21),(22),(23),(24),(25),(26),(27),(28),(29),(30),(31),(32),(33),(34),(35),(36),(37),(38),(39),(40),(41),(42),(43),(44),(45),(46),(47),(48),(49),(50),(51),(52),(53),(54),(55),(56),(57),(58),(59),(60),(61),(62),(63),(64),(65),(66),(67),(68),(69),(70),(71),(72),(73),(74),(75),(76),(77),(78),(79),(80);

TRUNCATE TABLE test_words;
INSERT INTO test_words (id, words) VALUES
(1  ,'!1i7y41DiNlK2;qCj5n1i7y;41DiNlK2qCj5n1;i7y41DiNlK2qC;j5n1i7y;41DiNlK2qCj5n1;i7y41DiNlK2qCj5n'),
(2  ,'!mVHfE9O8ZNdR;P5DsmmmVH;fE9O8ZNdRP5Dsmmm;VHfE9O8ZNdRP5D;smmmV;HfE9O8ZNdRP5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NtE;WHsSNN5Wpu84xxV;YNtEWHs;SNN5Wpu84xxVYNtE;WHsSNN5Wpu84xxVYNt');


-- Unfolding the words
TRUNCATE TABLE test_words_unfolded;
INSERT INTO test_words_unfolded (word, id)
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(t.words,';', nr.n),';',-1) as word, t.id
FROM test_words AS t
JOIN test_nums AS nr
  ON CHAR_LENGTH(t.words) - CHAR_LENGTH(REPLACE(t.words,';','')) >= nr.n - 1
 AND SUBSTRING_INDEX(SUBSTRING_INDEX(t.words,';', nr.n),';',-1) != '';

-- SELECT * FROM test_words_unfolded;

-- Building the word list
TRUNCATE TABLE test_wordlist;
INSERT INTO test_wordlist (word) 
SELECT DISTINCT word
FROM test_words_unfolded;

-- SELECT * FROM test_wordlist ORDER BY wordid;

TRUNCATE TABLE test_wordids;
INSERT INTO test_wordids (wordid, id)
SELECT l.wordid, u.id
FROM test_words_unfolded u
JOIN test_wordlist l ON l.word = u.word;

-- SELECT * FROM test_wordids ORDER BY id, wordid;

INSERT INTO test_wordids (id, wordid, idlist)
SELECT q1.id1, t3.wordid, GROUP_CONCAT(DISTINCT t3.id ORDER BY t3.id ASC SEPARATOR ',') as idlist
FROM
(
  SELECT t1.id as id1, t2.id as id2
  FROM test_wordids t1
  JOIN test_wordids t2 ON replace(t1.wordid,'!','') = replace(t2.wordid,'!','') and t1.id <> t2.id
  GROUP BY t1.id, t2.id
  HAVING COUNT(*) >= 3
) q1
JOIN test_wordids t3 ON t3.id = q1.id2
LEFT JOIN test_wordids t4 ON replace(t4.wordid,'!','') = replace(t3.wordid,'!','') and t4.id = q1.id1
WHERE t4.id is null
GROUP BY q1.id1, t3.wordid;

-- SELECT * FROM test_wordids ORDER BY id, wordid;

TRUNCATE TABLE test_result;
INSERT INTO test_result (id, words)
SELECT 
 wid.id, 
 GROUP_CONCAT(DISTINCT CASE WHEN wid.idlist IS NULL THEN w.word ELSE CONCAT('{[',wid.idlist,']',w.word,'}') END ORDER BY w.word ASC SEPARATOR '|') as words
FROM test_wordids wid
LEFT JOIN test_wordlist w ON w.wordid = wid.wordid
GROUP BY wid.id
ORDER BY wid.id;

SELECT * FROM test_result ORDER BY id, words;

I want to find common values (at least 2 but in this script I put >= 3 ) in ~150000 UNICODE CSV records (some records has more than 200 Field) the result is perfect now:

id  words
1   !1i7y41DiNlK2|41DiNlK2qCj5n1|i7y41DiNlK2qC|i7y41DiNlK2qCj5n|j5n1i7y|qCj5n1i7y
2   !mVHfE9O8ZNdR|fE9O8ZNdRP5Dsmmm|HfE9O8ZNdRP5Dsmmm|P5DsmmmVH|smmmV|VHfE9O8ZNdRP5D|VHfE9O8ZNdRP5Dsmm
3   !W5rpiQgtYxF|5MyfF5W5rp|5rpiQgtYxF5My|5rpiQgtYxF5MyfF5|fF5W5rp|iQgtYxF5MyfF5W
4   !XeMV3WTIxHD1d|3WTIxHD1d45KUX|45KUXeMV|eMV3WTIxHD1d45|eMV3WTIxHD1d45KU|KUXeMV
5   !ptwj11ir8XrwQ6|11ir8XrwQ6g2zqsp|1ir8XrwQ6g2zqsp|g2zqsptwj1|twj11ir8XrwQ6g2|twj11ir8XrwQ6g2zqs|zqsptwj
6   !H3W7T6f0PVDIT|3W7T6f0PVDITout|3W7T6f0PVDIToutt6n|6f0PVDIToutt6nH|outt6nH3W7T|T6f0PVDIToutt6nH|t6nH3W7
7   !hiwVTM5hEEft7Q|iwVTM5hEEft7QmPU|iwVTM5hEEft7QmPUmW|M5hEEft7QmPUmWh|mPUmWhiwVT|mWhiwV|TM5hEEft7QmPUmWh
8   !K2rdZkwoycyon|2rdZkwoycyonDIJ|2rdZkwoycyonDIJerE|DIJerEK2rd|erEK2rd|ZkwoycyonDIJerEK
9   !RJOis9hvsD37|9hvsD37qRLvQ6R|JOis9hvsD37qRL|JOis9hvsD37qRLvQ6|qRLvQ6RJOis|s9hvsD37qRLvQ6R|vQ6RJOi
10  !OxP7kULjLD0NlX|h5zWOZOxP7k|kULjLD0NlXh5zWOZO|ULjLD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94  !hicXljjOjW38K|DRiTo0hicXl|icXljjOjW38KDRi|icXljjOjW38KDRiTo0|jjOjW38KDRiTo0h|ljjOjW38KDRiTo0h|To0hicX
95  !Imfqgoi5GFO3e|1ISF0Imfqg|F0Imfq|goi5GFO3e1ISF0I|mfqgoi5GFO3e1IS|mfqgoi5GFO3e1ISF0|oi5GFO3e1ISF0I
96  !vWrPhvZREXoSRf|dJ5eDqvWrPh|eDqvWrP|hvZREXoSRfdJ5eDqv|vZREXoSRfdJ5eDqv|WrPhvZREXoSRfdJ5|WrPhvZREXoSRfdJ5eDq
97  !iP6pXo9Cx5LSE|EiHQ6iP6p|P6pXo9Cx5LSEEiH|P6pXo9Cx5LSEEiHQ6|pXo9Cx5LSEEiHQ6i|Q6iP6|Xo9Cx5LSEEiHQ6i
98  !51FKRpIJ2pl|1FKRpIJ2plIsl|1FKRpIJ2plIslSkw|IslSkw51FKR|pIJ2plIslSkw5|RpIJ2plIslSkw5|Skw51FK
99  !jQITOYz2l3TgiN|7jqYTQjQITO|OYz2l3TgiN7jqYTQj|QITOYz2l3TgiN7jq|QITOYz2l3TgiN7jqYTQ|YTQjQIT|Yz2l3TgiN7jqYTQj
100     !EWHsSNN5Wpu84x|NN5Wpu84xxVYNtE|SNN5Wpu84xxVYNtE|WHsSNN5Wpu84xxV|WHsSNN5Wpu84xxVYNt|xVYNtEWHsS|YNtEWHs

At first I had many Problems with mysql (connection Timeout and error) thus I added these to my.cnf|my.ini :

default-storage-engine=InnoDB
wait_timeout = 28800
interactive_timeout = 28800
key_buffer_size=32M
max_allowed_packet=4096M
group_concat_max_len = 1000000

innodb_strict_mode=0
innodb_file_per_table=1
innodb_strict_mode=0
innodb_buffer_pool_size = 4G
innodb_log_file_size = 1024M
innodb_flush_log_at_trx_commit = 1

Another problem was low width string in column thus I added varchar(1000) but Mysql gives an error again and I changed to varchar(500).

Now the result is very good for me but

1-It is slow

2-because I have a ! at first of my first column script some times put repeated values in my result that I don't want the same value with ! or {.

3-I Don't know which line is in process (I have not any counter for process recognizing)

4-If I stop I have no any data in the Result table, It save the data at the end

  • How much RAM? (I'm worried that you have set some of the tunables too high.) – Rick James Jan 7 at 17:54
  • Is it important whether a pair of words are in the same line? Do these lines have a consistent number of "words" (maybe 6?)? – Rick James Jan 7 at 17:58
  • @rick-james 8G ram X64 – SmmSamm Jan 7 at 19:18
  • Not sure why you join like this ON replace(t4.wordid,'!','') = replace(t3.wordid,'!',''). Aren't those wordid's just numbers, and using a function to join could ignore the use of an index? – LukStorms Jan 10 at 10:13
0

This is an algorithm problem, not a MySQL schema and tuning problem.

However, here are some tips:

  • Every table needs a PRIMARY KEY.
  • Don't over-normalize. In particular, word should not be normalized.
  • Use a programming language, not SQL for splitting text up. Most languages have very efficient 'split' or 'explode' functions.
  • The dataset (a few million words) can be easily handled in programming languages. The code will be much more efficient there (versus SQL).
  • Maybe @LukStorms can help me for normalizing – SmmSamm Jan 7 at 20:28
  • @RickJames Just FYI. The original question here from SmmSamm was actually looking for any solution, sql or not, that could solve it fast enough. It's a rather tricky programming puzzle when you're dealing with so much data as he has. – LukStorms Jan 10 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.