Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re (tilly) 1: flat-file vs DB_File

by dws (Chancellor)
on Sep 09, 2001 at 04:39 UTC ( #111226=note: print w/replies, xml ) Need Help??


in reply to Re (tilly) 1: flat-file vs DB_File
in thread flat-file vs DB_File

But that doesn't matter for access because you don't sequentially scan through the file, you jump right to the data, ...

If the file page you're jumping to is already in the kernel's disk cache, this is a win. But if getting to the target page requires moving the disk head, you might be better off with a sequential scan. For an infrequently accessed file in the 7-8 disk page range, I suspect that the linear scan might win.

I think we're in the toss-up category.

BTW, this is a tricky one to test by profiling, since you may have to go out of your way to make sure that the file isn't cached.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://111226]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2022-08-16 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?