Re: Simple query on huge table uses Index Scan instead of Seek

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Hendrikx (hjohn_at_please.remove.this.xs4all.nl)
Date: 04/07/04


Date: Wed, 07 Apr 2004 17:00:30 +0200

Dan Guzman wrote:

> I ran the script below under SQL 2000 SP3 and the plan showed an index seek.
> I suspect there is something different in your environment. Is the
> collation of the unid column different than the instance or database
> collation?

Yes, this was the problem. After changing the collation on the column
to the one the database was using, the query was correctly optimized.

Thanks for your help!

--John



Relevant Pages

  • Re: Change field collation
    ... constraints and statistics on the columns before you can alter ... There are quite a lot of caveats and you use this script at your own risk. ... Changing the collation of the existing tables is unfortunately not very ... You might consider using SEM to script out the objects in the database, ...
    (microsoft.public.sqlserver.programming)
  • Re: Changing collation -- URGENT
    ... You can use the following script to change the collations of your columns, ... duplicate primary key constraints create statements, ... Changing the collation of the existing tables is unfortunately not very ... You might consider using SEM to script out the objects in the database, ...
    (microsoft.public.sqlserver.server)
  • Re: Database collation error after moving to a remote sql server
    ... I think I'm going to try plan B: Install a second instance of SQL 2000 onto ... the remote server and set its default collation to the same as my SMS ... database, then move my db to the new instance. ... The char, varchar, text, nchar, nvarchar, or ntext system data types, ...
    (microsoft.public.sms.setup)
  • Re: [Info-Ingres] Select, escaping special chars
    ... Yes you can't change the database collation except by re-creating the database. ... [Info-Ingres] Select, escaping special chars ... Executing. ...
    (comp.databases.ingres)
  • Re: COLLATION PROBLEM CAN ANY ONE HELP
    ... Sounds like you may have code page X data in a code page Y database. ... database with a collation that matches the data's actual code page: ... COLLATION PROBLEM CAN ANY ONE HELP ... | Content-Type: text/plain; ...
    (microsoft.public.sqlserver.datamining)