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 3224608
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:14:36+00:00 2026-05-17T16:14:36+00:00

To preface, I’m aware (as should you!) that using SELECT * in production is

  • 0

To preface, I’m aware (as should you!) that using SELECT * in production is bad, but I was maintaining a script written by someone else. And, I’m also aware that this question is low on specifics… But hypothetical scenario.

Let’s say I have a script that selects everything from a table of 20 fields. Let’s say typical customer information.

Then let’s say being the good developer I am, I shorten the SELECT * to a SELECT of the 13 specific fields I’m actually using on the display end.

What type of performance benefit, if any, could I expect by explicitly listing the fields versus SELECT *?

I will say this, both queries take advantage of the same exact indexes. The more specific query does not have access to a covering index that the other query could not use, in case you were wondering.

I’m not expecting miracles, like adding an index that targets the more specific query. I’m just wondering.

  • 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-05-17T16:14:36+00:00Added an answer on May 17, 2026 at 4:14 pm

    It depends on three things: the underlying storage and retrieval mechanism used by your database, the nature of the 7 columns you’re leaving out, and the number of rows returned in the result set.

    If the 7 (or whatever number) columns you’re leaving out are “cheap to retrieve” columns, and the number of rows returned is low, I would expect very little benefit. If the columns are “expensive” (for instance, they’re large, or they’re BLOBs requiring reference to another file that is never cached) and / or you’re retrieving a lot of rows then you could expect a significant improvement. Just how much depends on how expensive it is in your particular database to retrieve that information and assemble in memory.

    There are other reasons besides speed, incidentally, to use named columns when retrieving information having to do with knowing absolutely that certain columns are contained in the result set and that the columns are in the desired order that you want to use them in.

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

Sidebar

Related Questions

Preface: I'm know that in most cases using a volatile field won't yield any
Preface I'm aware a similar question has been asked before, but I believe my
Preface : I'm honestly not sure if this should be on StackOverflow, SuperUser or
Preface: I am sure this is incredibly simple, but I have searched this site
Preface . I wrote a small application in C that plays a video file
Preface Let me start off by saying that I'm a relatively new programmer and
Preface: First time really using JavaScript + jQuery, so my problem likely stems from
Preface: I know that there are high quality graph APIs available. I'm interested in
Preface Please note, I'm not looking for a code solution, but rather insight into
To preface I am using Borland C++ and the VCL. I need some sort

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.