Try this:

UPDATE Table1 INNER JOIN Table2 ON Table1.textfield = Table2.textfield SET
Table2.integerfield = 1;

At 04:13 PM 5/14/04, Scott 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
>SETIntegerField = 1
>WHERETextField 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]

Reply via email to