I have table GLTrans, it has a nonclustered index:

My query:
SELECT
_glAccount.[Code] as [AccountCode]
,_glTrans.[CommentBooking] as [CommentBooking]
FROM
[GLTransHeader] _this
INNER JOIN
[GLTrans] _glTrans ON _glTrans.[GLTransHeader_Id] = _this.[Id]
LEFT INNER JOIN
[GLAccount] _glAccount ON _glAccount.[Id] = _glTrans.[GLAccount_Id]
WHERE
_glTrans.Folder_Id = '3AFE5BC5-1CC7-4198-9D89-B65591624C6E'
If I add Folder_Id in GLTrans table, query is show up. In the other hand, query is timeout.
My questions:
- If I group key with multiple columns, I must using them in where keyword?
- If I ungroup and create nonclustered index for each single column, is it different from above?
LEFT INNER JOIN- either it's anINNER JOINor anLEFT (OUTER) JOIN......