MySQL Forums
Forum List  »  Performance

Selects are slow when blob field?
Posted by: nmongeau
Date: November 23, 2004 09:37AM

Hi,

I have a table with this structure

* tablename varchar(100)
* recordid unsigned int(10)
* tag varchar(100)
* sequence unsigned smallint(5)
dataholder mediumblob
datalength unsigned int(10)

fields with an asterisk are indexed, and the mediumblob field holds 8000000 bytes for each record. The table presently contains 85 records, but a simple select like this:

select datalength from datastore where tablename='Clipboard' and recordid=15;

returns 28 rows and takes a staggering 16.05 seconds. Running the same query immediately after takes 0.5 seconds. But changing an argument to the query makes it go back to roughly 15 seconds.

Is there anything wrong with this setup, and why are the queries taking sooooo long? BTW it's version 4.0.16, running on an WinXP box.

Thanks,

Normand

Options: ReplyQuote


Subject
Views
Written By
Posted
Selects are slow when blob field?
5625
November 23, 2004 09:37AM
4120
November 23, 2004 09:51AM
3494
November 23, 2004 11:17AM
3610
November 23, 2004 05:29PM
3627
November 24, 2004 08:20AM
3769
November 24, 2004 05:05PM
3407
November 26, 2004 10:00AM
7870
November 26, 2004 10:41AM


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.