I have a huge database that is meant to be indexed, into which I am inserting a huge amount of information into it, broken up into a thousand chunks. Each time one is inserted the index is updated. Problem is, the time it takes to insert the information is becomes insanely long after around the 100th one or so, due to these huge transactions that cause the journal file to climb to over 300 megs.
Is there a way to postpone updating indices (possibly with a FREEZE INDEX
command or something) whereby the index would stay defined in the schema, and after all the tables have been populated, the it may be unfrozen and updated.
I know that this can already be accomplished by DROP INDEX
and CREATE INDEX
, but I was looking for a somewhat more elegant solution, or possibly a trick.
Unfortunately, I cannot change DBMSes easily, or I would investigate using PostgreSQL.