Welcome to WebmasterWorld Guest from 54.147.44.93

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

long blob time

     

nick patrick

11:45 pm on Jan 27, 2009 (gmt 0)

5+ Year Member



i have a table+longblob and the total space longblob use 2GB+ and when i browse the table from phpmyadmin so it taking much time to load is there any way to make load faster ?

PHP_Chimp

4:31 pm on Jan 28, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



What are you storing in the blob?
Could you just store a link to the object and not the object itself?
Could you compress the object before putting it into the blob?

eelixduppy

5:48 pm on Jan 28, 2009 (gmt 0)

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 5+ Year Member



[dev.mysql.com...]

This might also help. It contains great information about optimizing your tables. :)

henry0

9:38 pm on Jan 28, 2009 (gmt 0)

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



as soon as you reach multiple many 10K rows
phpMyAdmin will go on its knees, then it's time for the com line

nick patrick

8:32 am on Feb 1, 2009 (gmt 0)

5+ Year Member



there are pictures

PHP_Chimp

10:17 am on Feb 1, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



If they are pics then not much point in compressing, assuming you are storing them as jpeg (or something similar) not in raw format.

Why not store a string with the location of the pic instead fo the pic itself?
Or you could still store the pics in a table, but on there own, with nothing else and just refer to there primary key when retrieving the one/s you want.

So maybe you have something like:


TABLE pic_info
PRIMARY KEY
name string
height int
width int
alt string
blob_pk int --Foreign key for pic_blob table


TABLE pic_blob
PRIMARY KEY
pic blob

However most of the problem is probably coming from phpMyAdmin (as henry0 pointed out), as it is loading the whole table into memory before you can look through it. So on the command line you, so long as you dont do SELECT *, you can get just the information that you require.

So I guess that splitting the table is an easy way for you to be able to continue to use phpMyAdmin, or use the command line and dont split the tables.

nick patrick

2:12 pm on Feb 1, 2009 (gmt 0)

5+ Year Member



i don't want to use the phpmyadmin its just an admin place actually the problem is when i try to use from phpmyadmin so its take much time to show me the 30 rows then 30 then so on....
i just want to confirm is the php script also take that much time like 1-2 mins etc...
if yes then how much images per page will be the best choice ?

because its out from mysql so at a time may be there are 1000 visitors browsing that pages ...

henry0

6:03 pm on Feb 1, 2009 (gmt 0)

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Well, I strongly suppose that your problem is storing img in blob.
As PHP_Chimp pointed to, you need to transform the stored data in URL related to each img.

Search here we have a few good scripts about storing img, thumbs etc...

 

Featured Threads

Hot Threads This Week

Hot Threads This Month