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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:34:43+00:00 2026-06-08T06:34:43+00:00

SELECT A,B,C,D from Table1 Where Constraint1 vs SELECT A from Table1 Where Constraint1 SELECT

  • 0
SELECT A,B,C,D from Table1 Where Constraint1

vs

SELECT A from Table1 Where Constraint1
SELECT B from Table1 Where Constraint1
SELECT C from Table1 Where Constraint1
SELECT D from Table1 Where Constraint1

Is there any performance difference ?

  • 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-08T06:34:44+00:00Added an answer on June 8, 2026 at 6:34 am

    I think that the first one is faster, but.. let’s test it!

    Considering in the second group of selects to return A, B, C & D.

    IN SQL SERVER 2008 R2:

    Let’s try it:

    Create Table Test 
    (
    A int not null,
    B int not null,
    C int not null,
    D int not null,
    )
    
    insert into Test values (1,2,3,5)
    

    Running Execution plan for the first:

    select A, B, C, D from Test
    

    and this results on:

    enter image description here

    It’s on spanish, but you can see the numbers. Has a CPU Cost of 0.0000796

    So, let’s try it with the second:

    select A from Test
    select B from Test
    select C from Test
    select D from Test
    

    and this results on:

    enter image description here

    As you can see, each select use the same CPU Cost, but.. here has to do 4 selects. With a little row, you won’t see the difference, but, let me update, with more data

    UPDATE

    Now, I made a couple of inserts, and now we have:

    select count(*) from test
    
    76183 rows
    

    Let’s do the same: We got the first select, and in the execution plan, we got:

    enter image description here

    as you can see, we got more CPU COST (of course, more rows!)

    And then let’s check the 4 selects:

    enter image description here

    Again, we got the same CPU COST, but we run it 4 times !!

    In conclusion, there is no difference on showing one field or four, but we got a big difference on doing one select against 4.

    I know it’s a simply question, but I wanted to do some “science/research”

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

Sidebar

Related Questions

Here is my query select * from table1 inner join table2 on table1.typeId=table2.typeId; This
Let's say I have this query: select * from table1 r where r.x =
I have the following MySQL query statement: SELECT * FROM table1 INNER JOIN table2
I'm trying to do the below sql statement in GORM select * from table1
I'm trying to do the following query in Linq SELECT * FROM Table1 T1
Do these two queries differ from each other? Query 1: SELECT * FROM Table1,
(SELECT field1 FROM Table1) UNION (SELECT field1 FROM Table2); This gets all rows from
I need to select all from table1 where active=1 and replace t1cid,t2cid,L1cid,L2cid---L10cid with corresponding
Why this query doesn’t working: SELECT name FROM ( SELECT name FROM table1 UNION
I have a SQL statement like the following: select A from table1, (select B

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.