Is looking up a filename in a directory of 20,000 items as efficient as looking up a row in a database?

view story

http://serverfault.com – I'm trying to decide between storing some XML data either under uniquely identified file paths on a Linux filesystem, or in text columns in a database table. All other things being equal, is access time given a item identifier (either incorporated into the file path or a database unique column) roughly equal? I expect maybe 20,000 items. (HowTos)