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
Group: SQL Server DBA Board
ReplyDeleteDiscussion: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