Click to See Complete Forum and Search --> : SMB Search database Structure


Avatar_sg
07-04-2006, 02:32 AM
I live in a campus with a local network, mostly dedicated to using internet. However many people use it for sharing files. The LAN includes about 1000 machines and searching for a file is quite impossible. Few years ago we designed SMB search site but now the database is too slow, because it has been created for 100 computers.
The problem is - how to design the database? Currently it has three main tables - one for hosts, one for folders (id, id_of_parent_folder, name) and one for files (id, id_of_folder, name, size). And when you want to display 100 files and try to get their full paths it takes a lot of time, due to the recursive select queries for each one (all the folders are in the same table! every folder has the id of the parent folder). This will take for a 5GB MySQL database on a 3GHz 1GB RAM Debian server quite a long time. So, technically the problem is showld we keep on this way and pray, that there won't be many users using the search engine at the same time, think of some unimaginable select query, or change the design the database?
:confused: