Originally Posted by
Salem
Well you "might" gain something from mapping the file whilst in sequential access mode, but I really don't see the point of it in random access mode.
How many random accesses per second are you looking at?
Are they read, write or update accesses?
Is that random across all the files you have open (say read record 10 of file 2, then write record 14 of file 7)?
Remember disks are horribly slow devices compared to say the speed of RAM. Mapping the file might make it seem like it's in memory, but you're not escaping the underlying reality.
Plus (if what I suspect is true), you also involve the swap file, then you have twice as much disk activity and as a result, things are much much worse.