Sackgesicht VIP
Total posts: 1,636
05 Dec 2015 06:25

1) Do we need the column "filename", since it is also available through "fullpath"?

2) Do we need an index (idx_name) on "filename"?

Removing the column "filename" would result in a much smaller "__js_res_files" table.

Also the "__js_res_record" table would benefit from it --> smaller "fields" column.

Last Modified: 07 Dec 2015


Sergey
Total posts: 13,748
07 Dec 2015 11:02

Sackgesicht 1) Do we need the column "filename", since it is also available through "fullpath"?

You are right. It would be enough just fullpath. But in fact filename was core field I designed the whole idea with, and later I added fullpath just to avoid aditional logic in PHP to create full path to file. Because subfolder is in field parameters, I always have to qery field to get those to create path. To avoid those queries, I add this pareameter.

SO it will be very hard to get rid of filename because this is orimary column that is used very often.

Powered by Cobalt