this is the query taking time 1st it was taking only 2sec now it takes 40 to 60 secs .... databse size 18 GB ,ram 3 GB
sqlserver taking more then 2 Gb of ram
select alias.id,alias.aaa,alias.colname,table1.id,
table1.ttt,table1.c_f_name,cy.cmd from table3 alias,
cm table1,table2 cy where alias.colname=table1.colname
and cy.colname = table1.colname and table1.id='354'and
alias.colname in (select colname from table2 where colname
like '365464') and colname='A' and colname =123)