I keep having the same problem, but now I have some useful informations, see below:
First, we have changed the MAXDOP parameter from 0 to 4, but we have some problems in maintenance then we return to 0, but when this parameter was on 4, we had the same CPU problema.
Second, we find the "auto update statistics asynchronously" option that was on default "false", we change to "true", because we had the suspect that when a lot of queries are using the same tables, the SQL was unable to update the statistics, but 1 hour after change this parameter, we had the same CPU problem.
But, when we was looking the SQL, we find the same query a lot of times, this query is used multiple times by a lot of threads from the Weblogic server in the same time, like 150 executions simultaneously on the same table.
So, we start to question about the OUTPUT and INSERTED impact.
UPDATE nextEntryIn SET STATUS = @P1 , DATE_TIME_PROCESSING = getDate()
OUTPUT INSERTED.COD_QUEUE_IN, INSERTED.PRIORITY, .... few more fields
FROM (SELECT TOP 5 COD_QUEUE_IN, PRIORITY, .... the same few more fields
WHERE STATUS = @P2 AND CONSUMER = @P3 AND PRIORITY = @P4
ORDER BY COD_QUEUE_IN ASC)
Again, when the CPU goes high, we make the rebuild on this tables and the data of companies table.
Thanks for any help.