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
35 views

1 answer to this question.

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,130 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
150 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,280 points
33 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,240 points
121 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
36 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,620 points
173 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
79 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
32 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
45 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,130 points
44 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,130 points
49 views