Quote:
I am trying to load 34mb file into table and it's very slow.
I thought it was b'coz of fragmentation, even after removing fragmentation it's very slow.
How can i make it fast, we have to load the huge data in many tables for testing purpose.
|
34 megabytes is not a lot of data. If you're experiencing bad performance loading it, try disabling or dropping all of the indexes .. then load the data .. then turn the indexes back on.
When a database "rebuilds an index from scratch," it can do so efficiently by sorting the data and building the index from the sorted data. Very fast. What is extremely slow is doing 34 megabytes' worth of index updates, one at a time.
It's also a good idea to do the update as a series of small transactions, say every 1000 records or so, so that the computer doesn't plan to be able to "roll back" 34 megs' worth of data... a process that would produce a huge rollback file for absolutely no good reason.