function to truncate the start of it and just compare the portion that makes
it unique.
-----Original Message-----
From: Neil Robertson-Ravo [Team Macromedia]
[mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 3:30 PM
To: SQL
Subject: Re: Big honkin' query gettin' me down!
This query is insane - its a query which is gonna drag in any config, no
amount of indexing is gonna help you....you are performing an operation
with huge load implication..
You are comparing full TEXT datatypes within a WHERE IN clause which is
gonna take ages......if I were you I would look for a better comparison
for the IN.
You are also using a Non-Clustered index which im afraid in SQL7 is as
good as useless.
You could try and update the statistics on the table as well, you will
probably find its index is fragmented (a table with more than 10%
fragmentation is not good.)
Neil
Scott Weikert wrote:
>I've been messing with this particular issue the past couple of days. Other
related queries, I've managed to improve the performance of by leaps and
bounds, but this one still refuses to speed up.
>
>UPDATE Table2
>SET IntegerField = 1
>WHERE TextField IN
>(SELECT TextField
>FROM Table1)
>
>Now on Table2, I've got both the text field and integer field that are
being used indexed. In Table1, I've got that text field indexed. Non-unique,
non-clustered (SQL Server 7).
>
>The indexing has helped tremendously with other operations, but this
multi-table issue is still killing me. Running the query in Query Analyzer,
it's at 11min and counting. Both tables have between 410k and 420k records.
>
>What can I do differently that will speed this update up?
>--Scott
>
>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
