Click here to Skip to main content
14,271,828 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all,

I was asked a question in interview.Suppose an employee table with columns ID,Name,Age,
Sex,Designation and there are lakhs of records.

Query is
Select Name,Age,Sex from Employee where Designation=@EmpDesignation.

WHat is alternative query to improve the performance on database.How can we do that

Thanks in advance
ridoy 29-Sep-13 3:48am
I think indexing would be a good option and also use a LIKE operator.
bluesathish 30-Sep-13 3:47am
create a index on designation column would reduce the retreiving time.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100