or maybe you defined some indexed view on your old 2005 instance, I do't think sql 2012 have that much memory difference to run a query, the most important thing is your should first make sure your have same query environment except sql versioin and memory.