Re: Simple B-tree question
Posted in 1995
} Subject: Simple B-tree question } Date: Mon, 27 Feb 1995 21:31:52 -0500 } From: Almamater@aol.com } To: informix-list@rmy.emory.edu } } Hi there! } } I have to write a very simple application that will insert batches of about } to 50-100,000 records into a single (but much much larger) "master" table. } This process will be executed every night until the end of time. } } The "master" table has only one unique index and I can not drop the index } while processing the batches because we are running a 7-day 24-hour } operation. This unique key grows as time goes by. } } The question is: Is there a "best order sequence" for the records in the } batches to be inserted? Should I sort them? Should I randomize them? or It } does not matter? } } Regards, } } Alex Barragan I would think that either ascending or descending order by key would be better than random, to maximize reuse of buffered index pages. For some reason I have an intuitive feel that *reverse* of the actual key order, whether ascending or descending, might be slightly better because of how it will handle bucket splits when enlarging the index tree. However, I am having a tough time explaining my intuition, and such a thing would certainly be subject to variation based on coding details. Regards, Alan +---------------------------+-----------------------------------------------+ | R. Alan Popiel | Internet: alan@den.mmc.com | | Martin Marietta, SLS | Voice: 303-977-9998 | | P.O. Box 179, M/S 3810 | Standard disclaimers apply. Cutesy ones, too. | | Denver, CO 80201-0179 USA | Your mileage may vary. Void where prohibited. | +---------------------------+-----------------------------------------------+