I have a table (A) with 112000+ records and 38 columns, including a BLOB one (PDF/PNG files with max size 2Mb). The table have around 13Gb data space and almost 9Gb Index space. For normalization purposes, I’ve created another table (B), to store these BLOB data. Table A will have a FK from table B.
I’m having problems while inserting data from table A into table B… it just takes too long. I’ve tried SELECT INTO and the Export wizard. First choice ran for 2h, and I have no idea how much longer it would take. Second choice failed while exporting (managed to insert around 35000 records).
So, my question is: is there a faster way? Is there anything I can do so I can accomplish this? I mean, 112000 records doesn’t seem too much, despite the very large disk space.
While it’s not clear why your load is failing, if you are attempting to load the data in one large
INSERTstatement performance will imporve if you break the work into chunks. Don’t do it one row at a time. Try loading rows that total about 10M, 50M, 100M, 250M, etc. until you find an efficient “sweet spot”.