Current location: Hot Scripts Forums » Programming Languages » PHP » GD Library (Blobs fields or Files)?


GD Library (Blobs fields or Files)?

Reply
  #1 (permalink)  
Old 01-03-07, 06:37 PM
Augustino Augustino is offline
Newbie Coder
 
Join Date: Nov 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
GD Library (Blobs fields or Files)?

Hi

I need use GD, actually I have a script generating images using Blobs fields from My-SQL, the which is working very fine

I have read than using SQL, use more resources of the server

But, I think than reading the files using
fread() function, the execution time can be worst

Really for me is more important the execution time and the time to load the page than the resource usage

What Should I use?, Blobs Fields in MySQL or read files using GD Library and Why?

Best Regards and Happy Ney Year
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-03-07, 06:57 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Storing the files as a file within the file system on the server should result in the fastest access time, that of the file I/O operations. If you read the entire contents of the file at once. The memory needed for that variable would be equal to the size of the file.

Your database contents also gets stored in files within the file system on the server. However, to read this, the database server must locate the record within the database (depending on indexing, this could take several times longer than the directory operation needed to open this if it was stored directly as a file.) The database server must then read the record and pass it to the PHP client library functions that PHP uses. The client library code then pass the data to PHP in the resource result. The resource result will be at least the size of the data requested and will remain in memory until it is freed up or the script ends. You then must fetch the data from the resource result. This then uses twice the amount of memory.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GD library DLL ? Murugesan PHP 1 12-02-06 05:22 AM
Great, brandable domains for sale inc, Tootster.com planecrazy69 General Advertisements 2 10-11-06 11:12 AM
Need JPEG library installed for GD - WILL PAY hazarus Job Offers & Assistance 1 04-01-06 08:17 PM
What is GD Library matej The Lounge 2 12-26-04 06:35 PM
gd image library bug? <?Wille?> PHP 6 10-03-04 02:37 AM


All times are GMT -5. The time now is 04:20 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.