Hi all,
I've got a table which is storing Images with a size up to 1GB. When
I'm going to delete one of this rows the DELETE Statement takes up to 5
minutes. Which is the best way to delete the row more faster?
Has anyone an idea? Thanks in advance!
Gerrit Horeis
Software Developer
CI-Gate Development & Consulting GmbH
http://www.ci-gate.de
http://www.xira.de
http://www.bitbauer.deOn 04.12.2006 15:29, Gerrit Horeis wrote:
> I've got a table which is storing Images with a size up to 1GB. When
> I'm going to delete one of this rows the DELETE Statement takes up to 5
> minutes. Which is the best way to delete the row more faster?
> Has anyone an idea? Thanks in advance!
Did you measure what is slow there? Do you have an index on that table?
Is it used for deletion? ... With the little information you disclose
it's hard to come up with any reasonable advice.
Regards
robert|||Hi
Thanks for your answer. In the table im storing several image formats.
The delete Statement is
"Delete from Formats where ID = @.FormatID"
"ID" is the primary key of the table. Do I have to create an index as
well? I ever thought Sql just removes the reference to the data and so
it must be very fast.
Please help!
Robert Klemme schrieb:
> On 04.12.2006 15:29, Gerrit Horeis wrote:
>
> Did you measure what is slow there? Do you have an index on that table?
> Is it used for deletion? ... With the little information you disclose
> it's hard to come up with any reasonable advice.
> Regards
> robert|||On 05.12.2006 14:22, Gerrit Horeis wrote:
> Thanks for your answer. In the table im storing several image formats.
> The delete Statement is
> "Delete from Formats where ID = @.FormatID"
> "ID" is the primary key of the table. Do I have to create an index as
> well? I ever thought Sql just removes the reference to the data and so
> it must be very fast.
It seems you got the basics right. But storage of BLOBS is usually more
complex and less efficient than, say, VARCHAR columns. I guess you have
to run the Profiler to find out why it is actually slow.
Kind regards
robert
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment