Improve Install Sql Data Perl

Improve Install Sql Data Perl
Improve install SQL data PERL

The code installs the SQL data into the database.

The host does not allow remoter SQL access.

PERL

Any code should have minimum, or better still, reduce), impact on the host server. (Shared host).

The code supplied functions with the following issues that require your fixing:-

When run the code displays aright at first but after about an hour the display goes blank, the code still runs even though the display is blank and the process finishes after about 4 hours.

The code have a lot of delays, (Perl sleep), and some disconnects, a delay, then reconnects this is done to reduce impact on the host.

The code has, (commented out #), a number for display messages to show progress during the install of the SQL data. These would stop displaying after about one hour and now a file is created as a record of progress. The code emails me when complete.

Once you fix the going blank display the progress messages would be uncommitted so that the progress may be viewed.

So your tasks are:

Stop the display going blank so that progress messages may be viewed.

Spped up and Reduce impact on the host.

Advice of I could remove the delays, (sleep), to speed up the progress while reducing impact on the host.

The code:

Prepare outside this code :Zipped SQL data are uploaded as zip files.

How the code basically works.

The uploaded zipped SQL files are uncompressed, one at a time.

The uncompressed file is read in one line at a time writing to a temporary file of 2000 lines, (reading in the whole file caused memory issues during local testing). This is done to reduce impact on the host.

The temporary file is then installed in to the SQL database using the >>>load data local infile<<< command.

This repeats until all the SQL is installed.

Leave a Reply

Your email address will not be published. Required fields are marked *