Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8127453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:32:05+00:00 2026-06-06T07:32:05+00:00

I was asked in an interview to enlighten the ways one can use to

  • 0

I was asked in an interview to enlighten the ways one can use to optimize the query Select * from TableA if it is taking a lot of time to execute. (TableA) can be any table with large amount of data. The interviewer didn’t leave me any option like to select few columns or to use “WHERE” clause rather he wanted me to give solution for the subject query.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:32:08+00:00Added an answer on June 6, 2026 at 7:32 am

    It’s really hard to know what the interviewer was looking for.

    They might be relatively inexperienced and expected answers like:

    • “list all the columns instead of * since that’s way faster!”; or,
    • “add an ORDER BY because that will always speed it up!”

    The kinds of things an experienced person might be looking for are:

    • inspect the query plan, are there computed columns or other similar things taking additional resources?
    • revisit the requirements – do the users really need the whole table in arbitrary order?
    • is there a clustered index on the table; if not, is the heap full of forwarding pointers?
    • is there excessive fragmentation on the underlying table (and/or the index being used to satisfy the query)?
    • is the query being blocked?
    • what is the query waiting on?
    • is the query waiting on an external resource (e.g. crappy I/O subsystem, a memory grant, a tempdb autogrow)?
    • is the query parallel and suffering packet waits because the stats are out of date?

    There are a lot of underlying things that may be making that query slow or that may make that query a bad choice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This was the question asked in interview. Can we call one constructor from another
Was recently asked in an interview why a SELECT query on a MySQL db
I have been asked in an interview how one can return more than one
Recently I was asked in an interview that, can an Interface be considered as
This is an interview question asked a month ago.... Do session use cookies? If
I have been asked in an interview to write a SQL query which fetches
Here one more basic question asked in MS interview recently class A { public
I was asked in the interview tell me the different ways of exporting database
This was one of the interview questions asked. How to find the length of
One of the very tricky questions asked in an interview. Swap the values of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.