SQl server keeps statistical information about all queries in various tables. You can use the following code to determine what the longest running query is (from the sys.dm_exec_query_stats table) you should run the following DBCC command the query.
This DBCC commands clears the server cache restarts logging of the query running time.
Run following query to find longest running query
SELECT DISTINCT TOP 10
s.execution_count AS ExecutionCount,
s.max_elapsed_time AS MaxElapsedTime,
ISNULL(s.total_elapsed_time / s.execution_count, 0) AS AvgElapsedTime,
s.creation_time AS LogCreatedOn,
ISNULL(s.execution_count / DATEDIFF(s, s.creation_time, GETDATE()), 0) AS FrequencyPerSec
FROM sys.dm_exec_query_stats s
CROSS APPLY sys.dm_exec_sql_text( s.sql_handle ) t
You should also take a look at this technet magazine article Optimizing SQL Server Query Performance Which has a query for determining which query is the most expensive read I/O query, as well as how to look at execution plans an other optimizations.