Based on the file system, is a simple database query viewed?

The CMS that we use, called Kentico, stores media library files in the file system, and also stores a record in the database for file metadata (name, description, etc.). When you use the Media Library item to display these items, it will read files from the file system to display them. Faster reading from the file system and then querying the database? Or would it be easier to run a simple query on a media file metadata database table?

Assumptions:

  • Kentico is an ASP.NET application, so the code is in C #. They use simple DataSets to transfer their data.
  • Only metadata will be read from direct files such as file name and size.
  • No more than 100 files per folder.
  • The database query will be correctly indexed.
  • The query will look something like this:

    SELECT *
    FROM Media_File
    WHERE FilePath LIKE 'Path / To / Current / Media / Folder /%'

+3
source share
2 answers

The short answer is that it depends on a number of variable factors, but the file system will usually be faster than the database.

The longer answer: scanning a local file system in a known place is usually fast because the resource is close to home, and computers are designed to perform these operations very efficiently.

, , , , , , . , , , "" , . (SqLite , MS Sql Server Oracle), ( , , , ) (- Xeon SATA-RAID , Celeron).

+6

, , . , Kentico, SQL IIS , , .

, : . , , .

Kentico ( 5.0, 5.5), , , .

+2

All Articles