I implemented a SQL query as mentioned below
SELECT OLT.status,
OLT.queuedate,
( CONVERT(VARCHAR(10), OLT.queuedate, 101)
+ ' '
+ Stuff(RIGHT(CONVERT(VARCHAR(30), OLT.queuedate, 109), 14), 9, 4, ' ')
)
FROM onlineresults OLT WITH(nolock)
LEFT JOIN roadmap CR WITH(nolock)
ON OLT.roadmapid = CR.content_roadmap_id
The OnlineResults is having only 1,43000 records, but it taking nearly 5 minutes to complete the above query..
do we have any other way to make the query faster by creating indexes
Schema of Onlineresults table
OnlineID (Primary Key)
RoadmapId
StudentId
SectionId
Status
Retries
QueueDate
There are many fields in roadmap table and content_roadmap_id is primary key