Is SELECT * harmful in Database?

0 votes
Hi!!

Can someone tell me why SELECT* is considered a bad practice? Would it not mean less amount of code to change if you have added a new column?

I know that the SELECT COUNT(*) causes performance issues on some Databases, but what if it's needed on every column?
Sep 7, 2018 in Database by CodingByHeart77
• 3,680 points
20 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

There are really three major reasons:

  • Inefficiency in moving data to the consumer

  • Indexing issues

  • Binding Problems 

But let me tell you that it's not all bad for SELECT *. You can use for the following use-cases:

  • Ad-hoc queries

  • When * means "a row"

answered Sep 7, 2018 by DataKing99
• 8,100 points

Related Questions In Database

0 votes
1 answer

What is checkpoint in Database?

Checkpoint declares a point before which all ...READ MORE

answered Sep 4, 2018 in Database by darklord
• 6,140 points
56 views
0 votes
1 answer

Is there any boolean type in Oracle database?

Nope. I don't think there is one But ...READ MORE

answered Oct 10, 2018 in Database by Neha
• 6,140 points
22 views
0 votes
1 answer

Database Repair Options in Cassandra

Anti Entropy: Anti-entropy Repair is a process of ...READ MORE

answered Jun 28, 2018 in Database by kurt_cobain
• 9,260 points
54 views
0 votes
2 answers

Types of relationships in Database

There are 3 types of relationships in ...READ MORE

answered Aug 16, 2018 in Database by zombie
• 3,690 points
21 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by parth295
• 4,590 points
89 views
0 votes
1 answer

Difference between single and double quotes in SQL

Single quotes are used to indicate the ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,680 points
46 views
0 votes
1 answer

Can different databases use different name quotes?

This use of quotes is called delimited ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,680 points
24 views
0 votes
1 answer

Write a SQL query to find the names of employees that begin with ‘S’

To display the name of the employees ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,140 points
25 views
0 votes
1 answer

What is a Join in terms of database?

JOINS are used to combine rows from ...READ MORE

answered Nov 13, 2018 in Database by DataKing99
• 8,100 points
17 views
0 votes
1 answer

Indexes in Database

The index is a data structure that ...READ MORE

answered Aug 20, 2018 in Database by DataKing99
• 8,100 points
40 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.