I need to generate all word combinations of a varchar
of a record from a database.
I need to develop in MySQL
in PostgreSQL
To get simpler:
BASE DATA TABLE
Howtomakeaprocedure/functionthatselecttherecordsanddothis:
COMBINEDTABLE
That is, detected 3 words, made the combination of 3 factorial of these, generating an FK referenced to the ID (PK)
Considering that the TABLE DATA_BASE has N lines and that it has a string of n words, I'm already considering that it will have a large number of lines generated in the new table.
So, what would be the best way to execute this "query" that can be done on a cloud server (eg scheduling execution) so that if it stops, it will be resumed from the point where it was executed? / p>