Translate

Wednesday, May 25, 2011

Whether to use UNION or OR in SQL Server Queries

I got this idea of writing this article while reading the IBM Database a.k.a. DB2 magazine.

1 comment:

  1. Group: SQL Server DBA Board
    Discussion:Whether to use UNION or OR in SQL Server Queries

    Interesting but UNION only advantageous in a scenario I wouldn't recommend; implementing clustered indexes. I always excercise caustion with any clustered index implementation because the forced ordering of the rows is only any good with range lookups and can increase the costs of other queries. It has always annoyed me that the default position in SQL Server is a clustered index on an Identity column - largely useless!
    Posted by John Thorpe

    ReplyDelete