sunny.tjk (9/13/2013)
The computer that i run queries on has 2 processors. Shouldn't query1 execute faster than query2 ? Surprisingly, both executed taking exact time. Also, on OLTP system, should MAXDOP be disabled or should I leave it as default setting?Query1:
SELECT * FROM table
UNION
SELECT * FROM table1
Query2:
SELECT * FROM table
UNION
SELECT * FROM table1
OPTION (MAXDOP 1)
Query1 was using parallelism in the execution plan.
A part of your "problem" may be that you're returning the output to "The GREAT EQUALIZER"... the display. If you want to test such things, you'll need a large amount of data and some variables to dump each column into to take the display time out of the picture.
--Jeff Moden
Change is inevitable... Change for the better is not.