Re: fadvise syscall?

Ken Hirsch
2002-03-17T18:39:32Z

Anton Altaparmakov writes
> Posix or not I still don't see why one would want that. You know what you
> are going to be using a file for at open time and you are not going to be
> changing your mind later. If you can show me a single _real_world_ example
> where one would genuinely want to change from one access pattern to
another
> without closing/reopening a particular file I would agree that fadvise is
a
> good idea but otherwise I think open(2) is the superior approach.
>

Sure, a database manager can change the access pattern on every query. If
there's an index and not too many records are expected to match, it will use
a random pattern, otherwise it will use sequential access.