MySQL Forums :: Newbie :: Fastest way to check for an image in a table


Advanced Search

Fastest way to check for an image in a table
Posted by: Sebastian Jurk ()
Date: September 24, 2010 01:57PM

Hello,

I want to create a database with images. I dont need the images stored but I need to check if there is already an entry for an image.

So I thought one possibility would be to store a hash. But a hash is a string and stringsearches can be slow. At the end there could be millions of hashes in the table. Would fulltext be the thing to do here? And does it matter then what has I use?

I thought maybe it would be faster to add the height and width of the images as well as the number of bytes it has. So that a select can run like select hash where width=x and height=y and size=z and hash='ssss'
This way at first numbers are checked. Probably even with an index. This would probably be faster.

Or am I wrong and what would be the fastest way? Or am I wrong. Remember it should work as fast as possible because at some point it could contain millions of entries. Unique entries. Each hash different.

Thanks!
Sebastian

Options: ReplyQuote


Subject Written By Posted
Fastest way to check for an image in a table Sebastian Jurk 09/24/2010 01:57PM
Maybe someone can move it to Mysql Technology - Performance? Sebastian Jurk 09/24/2010 03:10PM
Re: Fastest way to check for an image in a table Rick James 09/25/2010 08:15PM
Re: Fastest way to check for an image in a table Sebastian Jurk 09/26/2010 04:00AM
Re: Fastest way to check for an image in a table Rick James 09/26/2010 09:17AM
Re: Fastest way to check for an image in a table Sebastian Jurk 09/26/2010 10:47AM
Re: Fastest way to check for an image in a table Rick James 09/26/2010 01:05PM
Re: Fastest way to check for an image in a table Sebastian Jurk 09/26/2010 05:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.