Welcome to WebmasterWorld Guest from 54.162.117.84

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

long blob time

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

Junior Member

5+ Year Member

joined:Jan 13, 2009
posts:46
votes: 0


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 ?
4:31 pm on Jan 28, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:July 12, 2007
posts:766
votes: 0


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?
5:48 pm on Jan 28, 2009 (gmt 0)

Senior Member

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

joined:Nov 12, 2005
posts:5966
votes: 0


[dev.mysql.com...]

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

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

Senior Member from US 

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

joined:Apr 19, 2003
posts: 4395
votes: 2


as soon as you reach multiple many 10K rows
phpMyAdmin will go on its knees, then it's time for the com line
8:32 am on Feb 1, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 13, 2009
posts:46
votes: 0


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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:July 12, 2007
posts:766
votes: 0


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.

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

Junior Member

5+ Year Member

joined:Jan 13, 2009
posts:46
votes: 0


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 ...

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

Senior Member from US 

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

joined:Apr 19, 2003
posts: 4395
votes: 2


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...