Which method is easier on the server...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Peter
Forum Commoner
Posts: 28
Joined: Mon Jun 10, 2002 12:40 am
Location: Brisbane, Australia

Which method is easier on the server...

Post by Peter »

I'm using PHP to upload to the server through the browser. I have two methods of storing the files:
  1. fread() the file and store the file data in the database.
  2. copy() the file to a directory and then store the path to the file in the db
I'd prefer method #1, but I don't want it to overload the server. Which one is easiest on the server?

Thanks. :)
MattF
Forum Contributor
Posts: 225
Joined: Sun May 19, 2002 9:58 am
Location: Sussex, UK

Post by MattF »

It depends how big the files are really, 100mb downloads wouldn't be so good in the database but small images maybe would be.
Peter
Forum Commoner
Posts: 28
Joined: Mon Jun 10, 2002 12:40 am
Location: Brisbane, Australia

Post by Peter »

It'll basically be about 300 or so MS Word Documents and a few images.
Post Reply