Hey,

> 1.I have to store some images in the db. Each image size is around
800kb
> to
> 900kb(almost 1 mb). Will it affect the performance. I am using
mediumblob
> for this.

I'm not sure about this as I've never really tried, but my intuition
tells me: no, it won't affect performance (noticeably anyway).

> insert into my_table('aaaa', load_file('c:/images/a.jpeg')) ;
> insert into my_table('bbbb', load_file('c:/images/b.bmp')) ;
> insert into my_table('cccc', load_file('c:/images/c.gif')) ;
> 
> is there any way of knowing the
> 
>     1. file type eg. jpeg, bmp, gif
>     2. name of the file inserted. eg. a,b,c

No, you'll need to store the filename as an extra column in the table.
MySQL has no idea what data is in the columns at all.  All it sees is
binary data.

> 3. Thirdly
>    does mysql treat jpeg and jpg formats differently?

Again, MySQL has no idea about images or sound files or movies.  It's
all just binary data so it won't treat .jpeg and .jpg files any
differently to how it would treat .wav files or whatever (.jpeg and .jpg
are the same thing anyway)

> 4.Is there any reason to fear, the blob data get corrupted while
inserting
> or selecting ?
>  for eg. if I issue a statement like this from the command prompt
>     select * from my_table ;

No, selecting (by definition) won't alter the data in the database.

Hope this helps,
Dean Harding.

> -----Original Message-----
> From: kayamboo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 25 September 2002 3:15 pm
> To: list mysql
> Subject: image size in mysql
> 
> filter;sql;query
> 
> Hello folks
> Can anyone pls give some useful tips for these questions
> 
> 1.I have to store some images in the db. Each image size is around
800kb
> to
> 900kb(almost 1 mb). Will it affect the performance. I am using
mediumblob
> for this.
> 
> 2.Secondly, if I am storing for eg.
> 
> this is my_table
> 
> id                  pic
> varchar(50)    mediumblob
> 
> suppose if i insert 3 rows like
> 
> insert into my_table('aaaa', load_file('c:/images/a.jpeg')) ;
> insert into my_table('bbbb', load_file('c:/images/b.bmp')) ;
> insert into my_table('cccc', load_file('c:/images/c.gif')) ;
> 
> is there any way of knowing the
> 
>     1. file type eg. jpeg, bmp, gif
>     2. name of the file inserted. eg. a,b,c
> 
> 3. Thirdly
>    does mysql treat jpeg and jpg formats differently?
> 
> 4.Is there any reason to fear, the blob data get corrupted while
inserting
> or selecting ?
>  for eg. if I issue a statement like this from the command prompt
>     select * from my_table ;
> 
> thanks for any suggestions ?
> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <mysql-unsubscribe-
> [EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to