Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mass file storage question 1

Status
Not open for further replies.

IDTstudios1

Programmer
Aug 8, 2004
72
US
Here's the situation:

There will be about 25,000 xml files that will range in size from 100kb to 5mb. Around 600 to 1,000 of these files will need to be accessed every minute.

Now, I have two options as far as storing these files:

1) MySQL for authentication and just save the files as whatever.xml in a neat little file structure.

Or

2) Since the files are in XML format I could break them apart and store them in the same (or different) MySQL database used for the authentication.


Which of the two would be my best bet here? Also keep in mind that there will need to be some load balancing between several servers.

Any input welcomed,
Andrew
 
well, I suppose that would be "input." Just to clarify for others, any input that is relevant to the post is welcomed.

btw, Birthday cake ice cream is much better...
 
I have no hard data to support my decision, but I think I would store as much of the XML data as possible in some kind of hierarchical form in MySQL.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
That's what I was leaning towards also. What about speed? Which would be faster access a file or or having mysql re-create a file every time someone needs to download it?

Thanks
 
Aahhh....

You didn't say what you were going to do with all this. I assumed users would access the data, not the files themselves.

If the users are going to download the files, you will get much better performance from leaving them on the filesystem. That way, PHP doesn't have to get involved in the streaming of the files -- your database server can handle it.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
CORRECTION:

In my last post, the phrase "your database server can handle it." should have read "your [red]web[/red] server can handle it."


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
An orderly, nested directory structure might help the speed as well.

Something like PHP uses for session.save_path.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top