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,690 points
55 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,190 points
248 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
44 views
0 votes
2 answers

Why is SELECT * table_name; is considered harmful?

Hi. Adding to @Tina's answer, there is ...READ MORE

answered Sep 23 in Database by Raghu
47 views
0 votes
1 answer

Why is SELECT * considered harmful?

If you add fields to the table, ...READ MORE

answered Sep 27 in Database by Omaiz
• 560 points
43 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,640 points
228 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,690 points
105 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,690 points
40 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,190 points
59 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
68 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
69 views